您的位置:首页 > 移动开发 > IOS开发

iOS---tableView的代理

2015-10-14 15:24 537 查看
//指定这组与上一组的间距
可以自定义多个cell的间距
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{

if(section ==0)
return 1;

if(section ==1)
return 1;

if(section ==3)
return 0;

else return
1;

}

//指定这组与下一组的间距
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{

if(section ==0)
return 100;

if(section ==1)
return 200;

if(section ==3)
return 300;

else return
1;

}

//每行高度
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath
*)indexPath{

//如果是第0组,第0行

if(indexPath.section==0 &&indexPath.row==0)
return 120;

else return
44;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: