用最简洁的代码实现基本的TableView。
只需在UIViewController的子类中导入 "UIViewController+GZAdd.h" 头文件,就可以一句话生成tableView
[self addTableView:self.view.bounds dicCellModel:@{@[model]:CELLSTR(UITableViewCell)}];
这是一个自定义cell的TableView,{{@[model]}}CELLSTR(UITableViewCell)}}
{{@[model]}} → 指存放数据的数组,数组的长度代表cell的个数
CELLSTR(UITableViewCell) → 自定义cell的类名(支持Nib)
[self addTableView:self.view.bounds multipleCellOnModel:@{arr:array}];
这是一个自定义多个cell的TableView
arr → 存放数组(Model)的数组
array → 存放cell名字的数组