uitableview 系统自带的分割线 顶格 不显示

iOS7后separatorInset  增加了一个 layoutMargins 接口,

顶格:

cell.separatorInset = UIEdgeInsetsZero;

cell.layoutMargins = UIEdgeInsetsZero;

cell.preservesSuperviewLayoutMargins = NO;

隐藏:

cell.separatorInset =UIEdgeInsetsMake(0, 0, 0, 横屏宽度);

cell.layoutMargins =UIEdgeInsetsMake(0, 0, 0, 横屏宽度);

cell.preservesSuperviewLayoutMargins = NO;

你可能感兴趣的:(uitableview 系统自带的分割线 顶格 不显示)