美文网首页
tableViewCell线左对齐

tableViewCell线左对齐

作者: yhj0129 | 来源:发表于2016-07-23 20:08 被阅读0次

方法添加如下:

-(void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath

{

if([tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {

[tableViewsetSeparatorInset:UIEdgeInsetsZero];

}

if([tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {

[tableViewsetLayoutMargins:UIEdgeInsetsZero];

}

if([cellrespondsToSelector:@selector(setLayoutMargins:)]) {

[cellsetLayoutMargins:UIEdgeInsetsZero];

}

}

相关文章

网友评论

      本文标题:tableViewCell线左对齐

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