https://github.com/behrad-kzm/bekmulticelltable
[deprecated]A table view based on MVVM with a SUPER easy use case.
https://github.com/behrad-kzm/bekmulticelltable
bek cell cocoapods generic ios multi mvvm uitableview
Last synced: 12 months ago
JSON representation
[deprecated]A table view based on MVVM with a SUPER easy use case.
- Host: GitHub
- URL: https://github.com/behrad-kzm/bekmulticelltable
- Owner: behrad-kzm
- License: mit
- Created: 2020-01-03T20:07:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-22T18:56:28.000Z (almost 6 years ago)
- Last Synced: 2025-01-10T07:58:59.598Z (about 1 year ago)
- Topics: bek, cell, cocoapods, generic, ios, multi, mvvm, uitableview
- Language: Swift
- Homepage:
- Size: 2.43 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.

[](https://travis-ci.org/popwarsweet/JellySlider)
[](http://cocoapods.org/pods/JellySlider)
[](http://cocoapods.org/pods/JellySlider)
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.
```swift
@IBOutlet weak var tableView: BEKMultiCellTable!
```
__TableCell Configuration:__
Make your custom cell confirms the BEKBindableCell protocol.
```swift
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.
```swift
tableView.push(cell: BEKGenericCell(viewModel: viewModel))
```
__note:__
If your table view cell hasn't XIB file just pass nil as the nib parameter.
```swift
tableView.push(cell: BEKGenericCell(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.