【发布时间】:2014-04-17 13:56:12
【问题描述】:
我已经实现了以下内容:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ return 75; }
只有在接收到 json 序列化数据时,高度才会正确显示。当它没有获取数据时,它将高度显示为默认高度。什么覆盖了这个方法?
【问题讨论】:
-
您需要设置表格视图的
rowHeight属性(在代码中或在IB 中)。如果不设置,根据文档获取默认高度:If you do not explicitly set the row height, UITableView sets it to a standard value.
标签: ios uitableview height