tableview 里面的 必须配套使用的方法
1: 如果不配套的先给出 footer的高度,那么 即时有view 可能也显示不出来
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
if (section == 1) {
return 35+45;
}
else
return 0.00001;
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if (section == 1) {
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 3500+45)];
v.backgroundColor = [UIColor blackColor];
return v;
}else{
return nil;
}
}
posted on 2016-04-21 10:27 🌞Bob 阅读(164) 评论(0) 编辑 收藏 举报