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

TableView 去掉多余行数、IOS最后一行Cell系统分割线顶头

2015-05-21 09:56 375 查看
//去掉底部多余的表格线

[tableView setTableFooterView:[[UIView alloc] initWithFrame:CGRectZero]];

//最后一行分隔线顶头显示

//http://stackoverflow.com/questions/25770119/ios-8-uitableview-separator-inset-0-not-working

static void setLastCellSeperatorToLeft(UITableViewCell*
cell)

{

if ([cell respondsToSelector:@selector(setSeparatorInset:)])
{

[cell setSeparatorInset:UIEdgeInsetsZero];

}



if ([cell respondsToSelector:@selector(setLayoutMargins:)])
{

[cell setLayoutMargins:UIEdgeInsetsZero];

}



if([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]){

[cell setPreservesSuperviewLayoutMargins:NO];

}

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