TableViewCell的分割线补全

2015-05-06  本文已影响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];

}

}

上一篇 下一篇

猜你喜欢

热点阅读