Black corners on UITableView Group Style

2019-02-02 04:02发布

I have a problem where my UITableView (group style) has a black "tip" above it's rounded corner.

I'm setting up the background of the tableview like so:

[meetingTableView setBackgroundColor:[[UIColor alloc] initWithPatternImage:[[UIImage alloc] initWithContentsOfFile:@"background.png"]]];

And my table view ends up looking like this:

black pointy edge on rounded corner http://papernapkin.org/pastebin/resource/images/imageEntryId/6487

Any ideas how I can get rid of those black points?

9条回答
虎瘦雄心在
2楼-- · 2019-02-02 04:45

Maybe if you put yourTableViewOutlet.backgroundView=nil;

查看更多
放荡不羁爱自由
3楼-- · 2019-02-02 04:46

Try this in your controller's viewDidLoad method:

meetingTableView.backgroundColor = [UIColor clearColor];
查看更多
Explosion°爆炸
4楼-- · 2019-02-02 04:50

Just in case you weren't already aware, there's another neat technique you can use to make customized backgrounds for UITableViews:

Not quite as simple as setting the background as you're doing, but it gives you a lot more flexibility and can scale to any table size.

查看更多
登录 后发表回答