Latest 0.4.3
License MIT
Platforms ios 10.3, tvos 10.3

Carthage compatible

So what is Presentables really? It is a really small library that should help you develop apps with table views a little bit faster than you would using the conventional methods. It also introduces binding of your data to the table views so any time you change your dataset, the table will update accordingly.


To run the example project, clone the repo, and run pod install from the Example directory first.



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

pod "Presentables"


Presentables is also available through Carthage. To install
it, simply add the following line to your Cartfile:

github "manGoweb/Presentables"


Create your cell (or header, implementation is pretty much the same)

import UIKit
import Presentables

class TableViewCell: UITableViewCell, Presentable {


class TableViewCellPresenter: Presenter {

    var presentable: Presentable.Type = TableViewCell.self

    var configure: ((Presentable) -> ())?


Create a data manager

class MyDataManagager: PresentableTableViewDataManager {

    // MARK: Initialization

    override init() {

        // Start a new section
        let section = PresentableSection()

        // Every section needs a header ... obviously
        let header = TableViewHeaderPresenter()
        header.configure = { presentable in
            guard let header = presentable as? MyHeader else {
            header.titleLabel.text = "My section"

        section.header = header

        // Create some basic cells
        for i: Int in 1...5 {
            let presenter = TableViewCellPresenter()
            presenter.configure = { presentable in
                guard let cell = presentable as? TableViewCell else {
                cell.textLabel?.text = "Cell number: (i)"

        // Add section to the data set

    // Override any delegate or datasource method you may want to
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 44


And lastly, bind your table view to your data manager

import UIKit
import Presentables

class ViewController: UITableViewController {

    let dataController = MyDataManagager()

    // MARK: View lifecycle

    override func viewDidLoad() {

        title = "Presentables!"

        var dc: TableViewPresentableManager = dataController
        tableView.bind(withPresentableManager: &dc)


And that’s all folks!


Ondrej Rafaj, [email protected]


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

Latest podspec

    "name": "Presentables",
    "version": "0.4.3",
    "summary": "Simple reactive library for managing table & collection views, written in Swift",
    "description": "Simplify the way you use table views and collection views in your app. This library is not supposed to be competing with RxSwift at all, this is only for developers who want a quick way to simplify their screens.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Ondrej Rafaj": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.4.3"
    "social_media_url": "",
    "platforms": {
        "ios": "10.3",
        "tvos": "10.3"
    "source_files": "Presentables/Classes/**/*",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This