您的位置:首页 > 其它

tableView设置cell高度及分组模式添加头与脚显示方法

2015-08-28 10:48 741 查看
.设置cell高度

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 80;
}
1
2
3
4


2.添加头显示

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
NSDictionary *dic = array[section];
NSString *group = dic[@"Group"];
return group;
}


3.添加脚显示

-(NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
NSDictionary *dic = array[section];
NSString *group = dic[@"Group"];
return group;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: