【发布时间】:2016-03-07 16:26:23
【问题描述】:
【问题讨论】:
-
==> 是的,删除一些边距以删除 tableView c stackoverflow.com/questions/19499366/…的间距设置@
标签: ios uitableview tableviewcell
【问题讨论】:
标签: ios uitableview tableviewcell
从单元格中删除所有边距设置。尝试将所有这些添加到
中的单元格中- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
// Remove insets in UITableViewCell separator
// Remove seperator inset
if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
cell.separatorInset = UIEdgeInsetsZero;
}
// Prevent the cell from inheriting the Table View's margin settings
if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
cell.preservesSuperviewLayoutMargins = NO;
}
// Explictly set cell's layout margins
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
cell.layoutMargins = UIEdgeInsetsZero;
}
【讨论】: