美文网首页SO 问题来了
笔记__ 为了让分割线从头开始

笔记__ 为了让分割线从头开始

作者: 失忆的程序员 | 来源:发表于2016-07-15 15:49 被阅读22次

_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 100, SCREEN_WIDTH, SCREEN_HEIGHT - 164) style:UITableViewStylePlain];

self.automaticallyAdjustsScrollViewInsets = NO;

_tableView.delegate = self;

_tableView.dataSource = self;

_tableView.rowHeight = 100;

//为了让分割线从头开始

if ([_tableView respondsToSelector:@selector(setSeparatorInset:)])

{

[_tableView setSeparatorInset:UIEdgeInsetsZero];

}

if ([_tableView respondsToSelector:@selector(setLayoutMargins:)])

{

[_tableView setLayoutMargins:UIEdgeInsetsZero];

}

_tableView.separatorColor = [UIColor lightGrayColor];

[self.view addSubview:_tableView];

相关文章

网友评论

    本文标题:笔记__ 为了让分割线从头开始

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