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];
}
}
[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];
}
}
相关文章推荐
- TableView 去掉多余行数、IOS最后一行Cell系统分割线顶头
- TableView 去掉多余行数、IOS最后一行Cell系统分割线顶头
- iOS - TableView 去掉多余行数以及最后一行Cell分割线的处理
- ios tableView去掉多余分割线 和最后一行分割线顶头显示
- UITableView 去掉多余行数、Cell系统分割线顶头
- iOS开发技巧-tableView去掉多余的空行分割线,自定义Cell分割线
- iOS 一行代码去掉UITableview多余分割线
- iOS tableView去掉显示多余的cell分割线
- iOS开发技巧-tableView去掉多余的空行分割线,自定义Cell分割线
- IOS TableViewCell分割线设置和隐藏多余cell
- ios开发技巧之tableView去掉多余的空行分割线 自定义cell分割线
- iOS-swift-tableview隐藏多余的cell分割线
- tableView小技巧:让cell分割线充满整个cell,去掉多余的分割线
- iOS tableViewCell plane格式下,接近section边缘不显示分割线却被复用解决办法
- uitableview去掉最后一行cell的底线
- iOS中如何去掉cell分割线
- 去掉最后一条 cell分割线l
- SWTableViewCell——一个和iOS 7的系统Mail类似,使用起来简单的UITableViewCell子类
- iOS 设置最后一行的分割线边距为零
- iOS tableView移除某一行的分割线 让分割线宽度为整个cell的宽度