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
对应的索引的元组