ios8以上UITableView留白问题

当cell的类型是plaint类型时,直接设置self.automaticallyAdjustsScrollViewInsets=NO;应该就能够的
当cell的类型是group类型时,此时要去掉tableView顶部的空白须要两步:
1.设置tableView的tableHeaderView高度为0.5;
self.MenuTable.tableHeaderView=[[UIview alloc] initWithFrame:(CGRectMake(0,20,82,0.5))];
2.设置heightForHeaderInSection的高度为0.5
-(CGFloat)tableView:(UItableView *)tableView heightForHeaderInSection(NSInteger)section{
return 0.5;
}it

相关文章
相关标签/搜索