https://github.com/behrad-kzm/beklistkit
BEKListKit contains both generics of UITableView and UICollectionView components and help you to create complex lists in just a minute.
https://github.com/behrad-kzm/beklistkit
beklistkit cocoapods collection generic lists mvvm swift tableview
Last synced: 4 months ago
JSON representation
BEKListKit contains both generics of UITableView and UICollectionView components and help you to create complex lists in just a minute.
- Host: GitHub
- URL: https://github.com/behrad-kzm/beklistkit
- Owner: behrad-kzm
- License: mit
- Created: 2020-04-09T07:50:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T16:48:38.000Z (about 6 years ago)
- Last Synced: 2025-11-04T01:06:06.015Z (8 months ago)
- Topics: beklistkit, cocoapods, collection, generic, lists, mvvm, swift, tableview
- Language: Swift
- Size: 15 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BEKListKit
It doesn't need to implement the UITableViewDataSource or UIColletionViewDataSource inside your view class. It also compatible with XIB contain cells or the programmatically implemented cells.
__-No need to Register Cell__
__-No need Type check for each cell type (no more if / else)__
__-No need to set reuseIdentifier (Automatically created from your class name)__
__-No need to set or comfirm DataSource protocols__
__-Enhanced for MVVM structures__
__-No need to deal with CollectionFlowLayout__
__-Both UITableView and UICollectionView supported__
__-Cand initiate with XIB or programmatically__
[](https://travis-ci.org/behrad-kzm/BEKListKit)
[](https://cocoapods.org/pods/BEKListKit)
[](https://cocoapods.org/pods/BEKListKit)
[](https://cocoapods.org/pods/BEKListKit)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
iOS 9.3+
Xcode 11
Swift 5.0
## Installation
BEKListKit is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'BEKListKit'
```
## Demo
This is a tableView contains some collectionViews as tableCell.
The TableView made in 3 lines of code.
and the CollectionView made in just 4 lines.
Download the project and check the example

## 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 UITableViewCell base Class and pass it's viewModel.
```swift
tableView.push(cell: BEKGenericCell.Table(viewModel: viewModel))
```
Or a BEKGenericCell with a UICollectionViewCell base Class and pass it's viewModel.
```swift
tableView.push(cell: BEKGenericCell.Collection(viewModel: viewModel))
```
__CollectionLayout Composer:__
Use BEKCollectionLayoutComposer to set layout to your collectionView.
```swift
collectionView.collectionViewLayout = BEKCollectionLayoutComposer.makeLayout(ForItemSize: bounds.size, scrollDirection: .horizontal)
```
## Installation
```
pod 'BEKListKit'
```
## 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.