Latest 0.0.2
Homepage https://github.com/noremac/DataSource
License MIT
Platforms ios 9.0, requires ARC
Authors

DataSource

A quick example:

import UIKit
import DataSource

class TableViewController: UITableViewController {
    private let dataSource = DataSource<DataItem>()

    override func viewDidLoad() {
        super.viewDidLoad()
        dataSource.configure(tableView: tableView, delegate: self)
        dataSource.appendSection(["Item 1", "Item 2", "Item 3"])
    }
}

extension TableViewViewController: TableViewDataSourceDelegate {
    func configureCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath) {
        guard let item = dataSource.itemForIndexPath(indexPath) else {
            return
        }

        cell.textLabel?.text = item.title
    }
}

Latest podspec

{
    "name": "Sectional",
    "version": "0.0.2",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "Provides a base structure for representing table or collection view data.",
    "homepage": "https://github.com/noremac/DataSource",
    "authors": {
        "Cameron Pulsford": "[email protected]"
    },
    "source": {
        "git": "https://github.com/noremac/DataSource.git",
        "tag": "0.0.2"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "DataSource/*.swift"
}

Pin It on Pinterest

Share This