联系人:石虎 QQ:1224614774 昵称: 嗡嘛呢叭咪哄
QQ群:807236138 群称: iOS 技术交流学习群
一、概念
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
UIView* sh_footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width , 60.0)];
UILabel *sh_label = [[UILabel alloc ]init ];
sh_label.frame = CGRectMake(20, 20, kScreen_Width- 40 , 20);
sh_label.text = @"----没有更多记录了----";
sh_label.textColor = [UIColor lightGrayColor];
sh_label.font = [UIFont systemFontOfSize:15];
sh_label.textAlignment = NSTextAlignmentCenter;
[sh_footerView addSubview:sh_label];
return sh_footerView;
return nil;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
if (section == 0) {
return 0.1;
}else if (section == 1){
return 4;
}else{
return 0.000001f; // 设置为0.0001 是为了不悬浮
}
return 0.1;
}
1143

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



