Latest 0.0.8
Homepage https://github.com/rosberry/TableViewTools
License MIT
Platforms ios 8.0
Authors

Platform
Swift Version
Carthage Compatible
CocoaPods Compatible
PRs Welcome

Powerful tool for making your UITableView usage simple and comfortable. It allows you to move your UITableView configuration logic to separated objects and simply register, add and remove cells from your table view.

Requirements

  • iOS 8.0+
  • Xcode 9.0+

Installation

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add the framework to your project.

github "rosberry/TableViewTools"

CocoaPods

You can use CocoaPods to install TableViewTools by adding it to your Podfile:

platform :ios, '8.0'
use_frameworks!
pod 'TableViewTools'

Manually

Drag Sources folder from last release into your project.

Basic usage

Creating manager

manager = TableViewManager(tableView: tableView)

Creating section

let titles = ["Item 1", "Item 2", "Item 3"]
var cellItems = [ExampleTableViewCellItem]()
titles.forEach { title in
let cellItem = ExampleTableViewCellItem(title: title)
    cellItems.append(cellItem)
}

let sectionItem = TableViewSectionItem(cellItems: cellItems)
manager.sectionItems = [sectionItem]

Cell item implementation

For basic usage, inside cell item should be implemented these entries from TableViewCellItemProtocol:

class ExampleTableViewCellItem: TableViewCellItemProtocol {

    var reuseType = ReuseType(cellClass: ExampleTableViewCell.self)

    func height(in tableView: UITableView) -> CGFloat {
        return 100
    }

    func cell(for tableView: UITableView, at indexPath: IndexPath) -> UITableViewCell {
        let cell: ExampleTableViewCell = tableView.dequeueReusableCell()
        return cell
    }
}

Authors

About

TableViewTools

This project is owned and maintained by Rosberry. We build mobile apps for users worldwide 🌏.

Check out our open source projects, read our blog or give us a high-five on 🐦 @rosberryapps.

License

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

Latest podspec

{
    "name": "TableViewTools",
    "version": "0.0.8",
    "summary": "High-performance UITableView managing in Swift.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/rosberry/TableViewTools",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dmitry Frishbuter": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rosberry/TableViewTools.git",
        "tag": "0.0.8"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Sources/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This