tableView相关

来源:互联网 发布:生活的意义 知乎 编辑:程序博客网 时间:2024/06/05 18:08

采用UITableViewStyleGrouped风格时, 为了调整多个分区的section高度
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
- 这个方法可以设置第一个section的高度, 但是对第二个以后的分区高度不起作用
要采用下面方法设置第二个以后的section高度:
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
- 这个返回的高度并不是第二个section以后的高度, 第二个以后的section高度是这个方法的返回值加上上一个方法的高度之和, 才是其高度

0 0