TableView Documentation

Protocol Automatic​Dimension​Cell

public protocol AutomaticDimensionCell: UITableViewCell  

自动计算高度协议 如果想让UITableViewCell支持自动计算高度,则需要实现AutomaticDimensionCell协议

AutomaticDimensionCell AutomaticDimensionCell UITableViewCell UITableViewCell AutomaticDimensionCell->UITableViewCell

Conforms To

UITableViewCell

Default Implementations

ad

实现自动计算高度关联内容

need​Reload​Height()

func needReloadHeight()  

需要进行刷新高度 只是计算高度 等待下次掉用heightForRow

reload​Height(completion​Handle:​)

func reloadHeight(completionHandle:@escaping AutomaticDimension.ReloadCellHeightCompletion)  

立即进行刷新 执行performBatchUpdates

Parameters

completion​Handle @escaping Automatic​Dimension.​Reload​Cell​Height​Completion

刷新完毕的回掉

set​Bottom​View​Constraints(constraints:​)

func setBottomViewConstraints(constraints:AutomaticDimension.Constraints)  

设置底部视图的约束 初始化和更新self.ad.view约束

Parameters

constraints Automatic​Dimension.​Constraints

约束条件