您的位置:首页 > 其它

记录一下。。tableview去掉多余cell

2015-08-28 17:03 106 查看


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

 (2014-11-21 16:05:12)


转载▼

标签: 


美食

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

 

    [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];

    }

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