UITableViewCell分割线左边顶格

版权声明:原创文章,未经允许禁止转载! https://blog.csdn.net/mlibai/article/details/48000143

UITableView 如果设置了显示分隔线,默认那个分割线左边不是完全顶格的,也就是左边没有挨上边。需要设置两个地方,可以它顶格。

// tableView 的设置
tableView.layoutMargins = UIEdgeInsetsZero;
// cell 的设置
cell.separatorInset = UIEdgeInsetsZero;
cell.layoutMargins = UIEdgeInsetsZero;


猜你喜欢

转载自blog.csdn.net/mlibai/article/details/48000143