Bug: provided height for section

2018-05-07  本文已影响83人  面糊

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'section header height must not be negative - provided height for section 0 is -0.100000'

遇到此bug, 查看一下报错页面的UITableView的代理方法是否使用了
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForHeaderInSection:(NSInteger)section
将该方法改为:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

上一篇 下一篇

猜你喜欢

热点阅读