您的位置:首页 > 移动开发 > IOS开发

tableView分割线从头开始

2015-12-24 14:03 489 查看
设置 tableView的俩个属性:

    _tableView.layoutMargins = UIEdgeInsetsZero;

    _tableView.separatorInset = UIEdgeInsetsZero;

在 cell 即将显示的时候,设置 cell 的属性(tableView 的代理方法)

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

    cell.separatorInset = UIEdgeInsetsZero;

    cell.layoutMargins = UIEdgeInsetsZero;

}

运行,OK
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios开发