美文网首页
TableViewCell的分割线补全

TableViewCell的分割线补全

作者: 陈世美_ | 来源:发表于2015-05-06 09:33 被阅读510次

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

}

}

相关文章

网友评论

      本文标题:TableViewCell的分割线补全

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