开发者

Background of a UIViewController to Grouped table view color

开发者 https://www.devze.com 2023-02-06 17:50 出处:网络
In a UITableView grouped style, the background of the table view is sort of like a grayish texture color. How can I grab that value such that I can set th开发者_Go百科e entire background of a UIViewCo

In a UITableView grouped style, the background of the table view is sort of like a grayish texture color. How can I grab that value such that I can set th开发者_Go百科e entire background of a UIViewController to be that color?


If you are developing for the iPhone and iPod touch, UIColor defines a groupTableViewBackgroundColor pattern that you can use:

[self.view setBackgroundColor:[UIColor groupTableViewBackgroundColor]];

You can also find this color in Interface Builder:

Background of a UIViewController to Grouped table view color

This won't be available on the iPad, however. You'll have to grab the image yourself and do a UIColor.colorWithPatternImage: instead.


...or you could use the pattern color that groupTableViewBackgroundColor itself references:

[UIColor pinStripeColor]

this works equally well on iOS6...

0

精彩评论

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