Latest 0.1.1
Homepage https://github.com/kgellci/QuickTable
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform
Swift 3.1

Warning

Currently developing to a stable version. Use as an experiment for now.

Usage

QuickTable is a subclass of UITableView, you can set it up via interface builder or in code. No need to worry about UItableViewDelegate and DataSource!

let tableView = QuickTable()
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "MyTableViewCell")

Create a row you want to display, add it to a section and set the section to the QuickTable

let row = QuickRow(reuseIdentifier: "MyTableViewCell", styleBlock: { (cell) in
    cell.textLabel?.text = "Hello World!"
})

let section = QuickSection(quickRowModels: [row])

You can style the section by passing options

let secondSection = QuickSection(options: [.headerTitle("The Header"), .footerTitle("The Footer")])

Tapping on a row is handled via a block

row.selectionBlock = { (cell) -> Bool in
    // The row was selected do something!

    // return if the cell should auto deselect
    return true
}

You can use automatic height computation or define the height on a section or row level

section.rowHeight = 60

// OR

row.computeRowHeightBlock { (row) -> CGFloat in
    return 100
}

Example

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

Requirements

Swift 3.1

Installation

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

pod "QuickTable"

Author

Kris Gellci Twitter URL

License

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

Latest podspec

{
    "name": "QuickTable",
    "version": "0.1.1",
    "summary": "A quicker way to build TableViews",
    "description": "The goal is to provide a robust UITableView solution which provides a clean and easy to read format.nnSome TableView implementations, especially settings screens, can use a variety of cells and section ranging from dynamicnto static.  The goal is to offer a clean solution for quickly building these views while providing an easy to maintainnsolution.  Settings screens change during a product lifecycle, adding a row here or a section there should not be annextrodenary feat of if / else statements.",
    "homepage": "https://github.com/kgellci/QuickTable",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "kgellci": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kgellci/QuickTable.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "QuickTable/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This