Skip to content

[deprecated]A table view based on MVVM with a SUPER easy use case.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.orig
Notifications You must be signed in to change notification settings

behrad-kzm/BEKMultiCellTable

Repository files navigation

BEKMultiCellTable

(deprecated) Use BEKListKit instead of this repo.

A generic table view based on MVVM that allows you to add multiple cell types at runtime in a single line of code.

CI Status License Platform

It doesn't need to implement the UITableViewDataSource inside your table view class. It also compatible with XIB contain cells or the programmatically implemented cells.

Demo

Example

usage:

Table Configuration:

Set BEKMultiCellTable to the table's class.

    @IBOutlet weak var tableView: BEKMultiCellTable!

TableCell Configuration: Make your custom cell confirms the BEKBindableCell protocol.

  extension MyCustomCell: BEKBindableCell {    
    typealias ViewModeltype = NewContactViewModel
    func bindData(withViewModel viewModel: NewContactViewModel) {
        titleLabel.text = viewModel.nameText
        profileImage.image = viewModel.profileImage
        newProfileImage.image = viewModel.extraImage
    }
}

Create and push BEKGenericCell:

Create a BEKGenericCell with a UITableView base Class and pass it's viewModel.

  tableView.push(cell: BEKGenericCell<MyCustomCell>(viewModel: viewModel))

note:

If your table view cell hasn't XIB file just pass nil as the nib parameter.

  tableView.push(cell: BEKGenericCell<MyCustomCell>(viewModel: viewModel, withNib: nil))

this will register your class agaist nib to the table.

Installation


  pod 'BEKMultiCellTable', :git => 'https://github.com/behrad-kzm/BEKMultiCellTable.git'

Author

Behrad Kazemi, Behradkzm@gmail.com, bekapps.com Visit Web Site

License

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

About

[deprecated]A table view based on MVVM with a SUPER easy use case.

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.orig

Stars

Watchers

Forks

Packages

No packages published