在estimatedHeightForRowAtIndexPath方法中,实测如果返回高度小于等于1,会导致程序崩溃。错误原因:table view row height must not be negative,建议返回高度做大于1的保护,不知道苹果官方啥时候会修这个问题。
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath { return 1.01; }
具体可见UITableView crash after i implemented estimatedHeightForRowAt indexPath`?
12-18
7002
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交