-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView *view = [[UIView alloc]init];
return view;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView *view = [[UIView alloc]init];
return view;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
return 5;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section==0) {
//return 0;
return section ==0?0.1f:8.0f;
}
return 5;
}
如果是uitableviewstypplain
self.automaticallyAdjustsScrollViewInsets = NO;
本文介绍如何在UITableView中自定义section的头部和尾部视图,并设置它们的高度。包括实现不同section头部的不同高度。
4596

被折叠的 条评论
为什么被折叠?



