美文网首页
UITableView 补全左侧15像素

UITableView 补全左侧15像素

作者: HJR | 来源:发表于2015-08-21 21:58 被阅读147次

UITableView 补全左侧15像素:

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

相关文章

网友评论

      本文标题:UITableView 补全左侧15像素

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