美文网首页
分割线长短设置

分割线长短设置

作者: 赤焰军少帅林殊 | 来源:发表于2017-12-07 12:15 被阅读4次

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

if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
    [tableView setSeparatorInset:UIEdgeInsetsZero];
}

if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
    [tableView setLayoutMargins:UIEdgeInsetsZero];
}

if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
    [cell setLayoutMargins:UIEdgeInsetsZero];
}

}

相关文章

网友评论

      本文标题:分割线长短设置

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