An iOS UITableView with detachable section and row. Use single section with multiple rows, or multiple sections with multiple rows. Or both. It depends.

29d72f0 · Update example project · over 9 years ago
10 commits
Clone
HTTPS
SSH
README.md

JomloTableView

CI Status Version License Platform

Example

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

Requirements

iOS 8

Installation

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

pod "JomloTableView"

Usage

import UIKit
import JomloTableView

class ViewController: UIViewController {

    @IBOutlet var jomloTableView: JomloTableView!

    var exampleSection = JomloTableViewSection()

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        let row = SimpleRow()

        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)
        exampleSection.addRow(row: row)

        jomloTableView.addSection(section: exampleSection)
        jomloTableView.reloadData()

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

Author

setoelkahfi, setoelkahfi@gmail.com

License

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