Class
TableView.Group
public class Group
表格的Group对象
Relationships
Member Of
TableView一个表格的数据源 可以快速搭建基于
UITableView的列表或者复杂的UI界面,支持高度自动计算,自动缓存高度,便捷的高度刷新。
Nested Type Aliases
AddCellBlock
public typealias AddCellBlock = (_ cell:Cell) -> Void
在Group添加Cell
Parameters
| Name | Type | Description |
|---|---|---|
| cell | 添加的 |
Properties
Methods
addCell(_:_:identifier:)
public func addCell<C:UITableViewCell>(_ type:C.Type,
_ block:AddCellBlock,
identifier:String = "\(C.self)")
添加一个或者一组的Cell
Parameters
| Name | Type | Description |
|---|---|---|
| type | C.Type |
对应 |
| block | AddCellBlock |
配置 |
| identifier | String |
自定义标识符 默认为 |
addHeader(_:_:identifier:)
public func addHeader<HF:UITableViewHeaderFooterView>(_ type:HF.Type,
_ block:AddHeaderFooterBlock,
identifier:String = "\(HF.self)")
添加一个Header
Parameters
| Name | Type | Description |
|---|---|---|
| type | HF.Type |
对应 |
| block | AddHeaderFooterBlock |
配置 |
| identifier | String |
自定义标识符 默认为 |
cellIndex(indexPath:)
public func cellIndex(indexPath:IndexPath) -> (Cell,Int)?
获取IndexPath对应Cell和在Cell的索引
Parameters
| Name | Type | Description |
|---|---|---|
| indexPath | IndexPath |
当前的 |
Returns
对应Cell数据源和Cell对应的索引的元组