作为表格的一部分,TableViewCell
可以有不同的高度吗?
如果是这样,怎么能做到这一点呢?
使用 UITableViewDelegate
方法:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
是的,您必须为表视图数据源委托覆盖以下函数:
- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath