美文网首页UITableViewtableview
iOS延长tableView的分割线方法

iOS延长tableView的分割线方法

作者: love_tableView | 来源:发表于2015-10-30 09:59 被阅读828次

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

          [_tableViewsetSeparatorInset:UIEdgeInsetsZero];

}

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

         [_tableViewsetLayoutMargins:UIEdgeInsetsZero];

}

#pragma mark - tableViewDelegate

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

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

                [cellsetSeparatorInset:UIEdgeInsetsZero];

           }

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

              [cellsetLayoutMargins:UIEdgeInsetsZero];

            }

}

相关文章

网友评论

本文标题:iOS延长tableView的分割线方法

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