Background of a UIViewController to Grouped table view color
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:
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...
精彩评论