您的位置:首页 > 产品设计 > UI/UE

UITableView 去掉多余行数、Cell系统分割线顶头

2016-03-10 09:59 495 查看
转自:/article/11543025.html

//去掉底部多余的表格线

[self.mineTableView 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];

}

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