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

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

[tableViewsetTableFooterView:[[UIViewalloc]initWithFrame:CGRectZero]];

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

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

staticvoidsetLastCellSeperatorToLeft(UITableViewCell* cell)

{

if([cellrespondsToSelector:@selector(setSeparatorInset:)]) {

[cellsetSeparatorInset:UIEdgeInsetsZero];

}

if([cellrespondsToSelector:@selector(setLayoutMargins:)]) {

[cellsetLayoutMargins:UIEdgeInsetsZero];

}

if([cellrespondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]){

[cellsetPreservesSuperviewLayoutMargins:NO];

}

}

你可能感兴趣的:(TableView 去掉多余行数、IOS最后一行Cell系统分割线顶头)