开发者

iPhone: how can I keep the borders of grouped tableview but set its background to transparent

I use a grouped tableview and custom cells which I load from nib. When I set the background colour of tableview to clearcolor then I can only see the contents of the 开发者_C百科cells but nothing about the tableview. I like the rounded corners and seperator lines of the gropued view, so I want to keep those lines and change the colours of the lines, but set the table's background colour transparent so I will see the main image of the window. is this possible?


So you wanted to change the color of separator lines

self.tableView.separatorColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1];

// give your hex color code or your color


Inside of viewDidLoad of your view controller you need to set the backgroundView to nil and the backgroundColor to clear.

self.tableview.backgroundView = nil;
self.tableview.backgroundColor = [UIColor clearColor];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜