如何更改UITableView边框的颜色?

时间:2022-11-20 21:29:07

I have a UITableView in a UISplitViewController and I have a custom header cell at the top of that table view. The custom header view has a dark grey background image set in it, but the problem is the left side of the header cell shows a light grey border (circled in red in the image below)...

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

如何更改UITableView边框的颜色?

How can I change that color or get rid of that border?

我怎样才能改变那种颜色或摆脱那个边界?

Thanks so much in advance for your wisdom!

非常感谢您的智慧!

1 个解决方案

#1


7  

Import #import "QuartzCore/QuartzCore.h" In ViewDidLoad use,

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

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

Check this too.

检查一下。

#1


7  

Import #import "QuartzCore/QuartzCore.h" In ViewDidLoad use,

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

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

Check this too.

检查一下。