ZDTableViewBinding 0.3.2

ZDTableViewBinding 0.3.2

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2019年12月

faimin维护。



  • Zero.D.Saber

License Platform Language

ZDTableViewBinding

简介:

ZDTableViewBinding是利用ReactiveCocoa来自动分发tableView的数据、计算高度并缓存的工具,支持headerfooter

ZDTableViewBinding 使用方法:

主要的是一个实例方法和一个类方法

+ (instancetype)bindingHelperForTableView:(__kindof UITableView *)tableView
                             multiSection:(BOOL)multiSection
                         dataSourceSignal:(__kindof RACSignal *)dataSourceSignal
                              cellCommand:(nullable RACCommand *)cellCommand
                      headerFooterCommand:(nullable RACCommand *)headerFooterCommand

在传递参数之前,需要把cellsection包装成cellViewModelsectionViewModel,监听source数据,然后将sourceSignal传递给ZDTableViewBindingHelper,剩下的就不用担心了。

cell和section中的控件的响应事件将通过外部的command进行操作,比如,当footer上的