Latest 0.0.2
Homepage https://github.com/taiyungo/ListView
License MIT
Platforms ios 8.0

ListView

a ListView with a simple API to stack different kind of cells vertically


class ViewController: UIViewController {

    @IBOutlet weak var collectionView: UICollectionView! {
        didSet { collectionView.dataSource = datasource }
    }

    let datasource = ListDatasource()

    override func viewDidLoad() {
        super.viewDidLoad()

        datasource.register(
            cell: LabelCell.self,
            at: 0,
            setupClosure: { ($0 as! LabelCell).setup(with: "bla") }
        )

        datasource.register(
            cell: ButtonCell.self,
            at: 1,
            setupClosure: { ($0 as! ButtonCell).setup(with: "bla") }
        )

        datasource.register(nib: NibCell.nib, for: collectionView, cell: NibCell.self, at: 2) {
            ($0 as! NibCell).setup(with: "bla")
        }
    }
}

Latest podspec

{
    "name": "MTListView",
    "version": "0.0.2",
    "summary": "ListView based on UICollectionView",
    "description": "a ListView with a simple API to stack different kind of cells vertically",
    "homepage": "https://github.com/taiyungo/ListView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "sintaiyuan",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/taiyungo/ListView.git",
        "tag": "0.0.2"
    },
    "source_files": [
        "ListView",
        "ListView/**/*.{h,m,swift}"
    ],
    "exclude_files": "ListView/Exclude",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This