Skip to content

BEKListKit contains both generics of UITableView and UICollectionView components and help you to create complex lists in just a minute.

License

MIT, Unknown licenses found

Licenses found

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

behrad-kzm/BEKListKit

Repository files navigation

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

CI Status Version License Platform

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. To install it, simply add the following line to your Podfile:

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.

    @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 UITableViewCell base Class and pass it's viewModel.

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

Or a BEKGenericCell with a UICollectionViewCell base Class and pass it's viewModel.

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

CollectionLayout Composer:

Use BEKCollectionLayoutComposer to set layout to your collectionView.

  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.

About

BEKListKit contains both generics of UITableView and UICollectionView components and help you to create complex lists in just a minute.

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.orig

Stars

Watchers

Forks

Packages