Generic table view controller with external data processing

Overview

FlexibleTableViewController

Language Version License Platform

Swift library of generic table view controller with external data processing of functionality, like determine cell's reuseIdentifier related to indexPath, configuration of requested cell for display and cell selection handler etc

Example

Initialization and cell registering.

let flexibleTableVC = FlexibleTableViewController<CustomCellData, OrderedListGenerator<CustomCellData>>(style: .plain, configuration: TableConfiguation())
flexibleTableVC.register(CustomUITableViewCell.self, forCellReuseIdentifier: CustomUITableViewCell.reuseIdentifier)

Define "reuse identifier" relatively to indexPath:

flexibleTableVC.requestCellIdentifier = { indexPath in
  return CustomUITableViewCell.reuseIdentifier
}

Configure cell relatively to data:

flexibleTableVC.configureCell = { (cell: UITableViewCell, data: CustomCellData?) in
  guard let data = data else { return false }

  if let detailedData = data as? DetailedCustomCellData {
    cell.textLabel?.text = detailedData.title
    cell.detailTextLabel?.text = detailedData.detailed
  }

  cell.backgroundColor = data.backgroundColor

  return true
}

Process cell select here:

flexibleTableVC.cellDidSelect = { indexPath in
  // return true for immediately deselection
  return true
}

Requirements

Updated to Swift 4

For Swift 3.1 version use v.2.0.6
For Swift 2.2 version use v.1.1.0

Installation

FlexibleTableViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "FlexibleTableViewController"

Author

Pilipenko Dima, [email protected]

Also article on Medium: https://medium.com/@dimpiax/swift-flexibletableviewcontroller-dbd17087e0b9

License

FlexibleTableViewController is available under the MIT license. See the LICENSE file for more info.

You might also like...
A waterfall grid layout view for SwiftUI.
A waterfall grid layout view for SwiftUI.

WaterfallGrid A waterfall grid layout view for SwiftUI. Features Irregular grid of content. Columns number different per device orientation. Spacing a

🎛 QGrid: The missing SwiftUI collection view.
🎛 QGrid: The missing SwiftUI collection view.

[NOTE] If you'd like to see QGrid in action, check out this demo of QDesigner (see video below). Install QDesigner: https://apps.apple.com/us/app/qdes

A flexible grid layout view for SwiftUI
A flexible grid layout view for SwiftUI

📱 GridStack A flexible grid layout view for SwiftUI. WWDC20 Update Apple  released LazyVGrid and LazyHGrid at WWDC20. If you are fine to only suppor

Display list of Marvel comic Characters and its detail view
Display list of Marvel comic Characters and its detail view

Marvel Universe Display list of Marvel comic Characters and its detail view Installation Dependencies in this project are provided via Xcodegen (proje

 Building An Interactive Grid View
Building An Interactive Grid View

Building An Interactive Grid View This demo shows a few techniques on how to build a re-ordable grid view based on stock UICollectionView API. Here ar

An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application)
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application)

SWTableViewCell An easy-to-use UITableViewCell subclass that implements a swipeable content view which exposes utility buttons (similar to iOS 7 Mail

Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.
Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.

ios-dragable-table-cells Support for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers. You drag cells by tapping and hold

Simple timeline view implemented by UITableViewCell
Simple timeline view implemented by UITableViewCell

TimelineTableViewCell TimelineTableViewCell is a simple timeline view implemented by UITableViewCell. The UI design of TimelineTableViewCell is inspir

Generic collection view controller with external data processing

FlexibleCollectionViewController Swift library of generic collection view controller with external data processing of functionality, like determine ce

Typed, yet Flexible Table View Controller
Typed, yet Flexible Table View Controller

ConfigurableTableViewController Simple view controller that provides a way to configure a table view with multiple types of cells while keeping type s

Quinbay - The project covers dynamic tableview cell height, MVVM and clean Architecture and Prefetching Table Data From server or infinite scroll view A controller that uses a UIStackView and view controller composition to display content in a list
A controller that uses a UIStackView and view controller composition to display content in a list

StackViewController Overview StackViewController is a Swift framework that simplifies the process of building forms and other static content using UIS

Appz 📱 Launch external apps, and deeplink, with ease using Swift!
Appz 📱 Launch external apps, and deeplink, with ease using Swift!

Appz 📱 Deeplinking to external applications made easy Highlights Web Fallback Support: In case the app can't open the external application, it will f

🎯Linker  Lightweight way to handle internal and external deeplinks in Swift for iOS
🎯Linker Lightweight way to handle internal and external deeplinks in Swift for iOS

Linker Lightweight way to handle internal and external deeplinks in Swift for iOS. Installation Dependency Managers CocoaPods CocoaPods is a dependenc

A simple deamon that restores your window positions on external monitors.

Memmon Memmon remembers what your Mac forgets – A simple deamon that restores your window positions on external monitors. FAQ Why‽ I am frustrated! Wh

Overrides macOS external display EDIDs to force RGB color

edidiotic edidiotic creates EDID overrides for external displays on macOS that set the display type to RGB color and removes all extension blocks. Thi

A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using external references approach.

multipleP21ReadsSample A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using extern

WordScramble app for demonstrating loading an external txt file and working with it
WordScramble app for demonstrating loading an external txt file and working with it

WordScramble-v2 WordScramble app for demonstrating loading an external txt file and working with it App for creating anagrams from given 8 letter word

IOS-PokemonQuizApp - Assignment to make a responsive iOS app. App has to connect with an external API

iOS-PokemonQuizApp Assignment to make a responsive iOS app. App has to connect with an external API. The Project The idea of the project is to make a

Owner
Dmytro Pylypenko
Sociologist & Software Engineer
Dmytro Pylypenko
Use Yelp API to fetch restuarants around a location and show them in a table view

Yelp Use Yelp API to fetch restuarants around a location and show them in a table view - Infinite scrolling, Prefetching, Image Caching. Design Patter

null 0 Nov 1, 2021
Using UI Table View

News-App Table View와 Table view controller Table View : Table의 크기를 지정할 수 있다. Table View Controller: 전체의 뷰가 하나의 테이블 Table View Table view 구성요소 결정하기 어떤

Jiwon 0 Dec 9, 2021
A UITableView extension that enables cell insertion from the bottom of a table view.

ReverseExtension UITableView extension that enabled to insert cell from bottom of tableView. Concept It is difficult to fill a tableview content from

Taiki Suzuki 1.7k Dec 15, 2022
TableViews - Emoji Table View For iOS With Swift

TableViews Hello! This is EmojiTableView. Let me introduce you my first app when

null 0 Jan 2, 2022
Simple static table views for iOS in Swift.

Simple static table views for iOS in Swift. Static's goal is to separate model data from presentation. Rows and Sections are your “view models” for yo

Venmo 1.3k Nov 19, 2022
A Swift library for swipeable table cells

BWSwipeRevealCell Using the library **Note: Use version 1.0.1 for Swift 2.3 support and version 2.0.0 or higher for Swift 3 support ** There are two m

Kyle Newsome 67 May 11, 2022
Type-safe declarative table views.

TableKit TableKit is a super lightweight yet powerful generic library that allows you to build complex table views in a declarative type-safe manner.

Max Sokolov 694 Dec 13, 2022
This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

Fun 60 Dec 17, 2022
PreviewTransition is a simple preview gallery UI controller with animated tranisitions.

PreviewTransition is a simple preview gallery UI controller with animated tranisitions. Swift UI library made by @Ramotion

Ramotion 2.1k Dec 19, 2022