我将我的 static
tableView
的分隔符设置为 none
,我可以在单元格中设置我的 separator
一个人吗?
在 Storyboard中,我将separator
设置为none
最佳答案
可以将分隔符设置为无,然后在需要划线的单元格中画一条线。
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, cellHeight - 1 / [UIScreen mainScreen].scale, [UIScreen mainScreen].bounds.size.width, 1 / [UIScreen mainScreen].scale)];
// (1 / [UIScreen mainScreen].scale) : 1px width line.
lineView.backgroundColor = [UIColor blackColor];
[self addSubview:lineView];
关于iOS:我将我的静态tableView分隔符设置为无,我可以在我的单元格中单独设置我的分隔符吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38088878/