How can I get the pinstripe background to show?

2019-02-08 17:14发布

问题:

I'd like to use the pinstripe background that shows up in the Settings app and many other iPhone apps behind table views. Is is already included in some graphics library? How can I make it show up in a UIView or UITableView?

Pinstripe http://img.skitch.com/20090630-p783xugab8i9c7x2c63t3ped52.jpg

回答1:

myView.backgroundColor = [UIColor groupTableViewBackgroundColor];

Just to stick with convention though, don't apply this background unless you're using tableviews that scroll as this type of background is semiotical to tableview scrolls.



回答2:

You just have to use the "grouped" style on your table view.



回答3:

As of iOS 6.0, this doesn't work anymore.