如何更改UITableView边框的颜色?

时间:2012-10-16 19:59:19

标签: iphone ios ipad

我在UISplitViewController中有一个UITableView,我在该表视图的顶部有一个自定义标题单元格。自定义标题视图中设置了深灰色背景图像,但问题是标题单元格的左侧显示浅灰色边框(在下图中以红色圈出)...

enter image description here

如何更改颜色或摆脱边框?

非常感谢您的智慧!

1 个答案:

答案 0 :(得分:7)

导入#import "QuartzCore/QuartzCore.h" 在ViewDidLoad中使用,

tableView.layer.borderWidth = 3.0;
tableView.layer.borderColor = [UIColor redColor].CGColor;

同时检查this

相关问题