美文网首页
设置单元格分割线

设置单元格分割线

作者: 喜欢就可以 | 来源:发表于2016-06-30 13:31 被阅读48次

-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if ([cell respondsToSelector:@selector(setSeparatorInset:)])
    {
        [cell setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)])
    {
        [cell setPreservesSuperviewLayoutMargins:NO];
    }
    if ([cell respondsToSelector:@selector(setLayoutMargins:)])
    {
        [cell setLayoutMargins:UIEdgeInsetsZero];
    }
}

相关文章

网友评论

      本文标题:设置单元格分割线

      本文链接:https://www.haomeiwen.com/subject/iizxjttx.html