PDA

View Full Version : Settings app stripey background




MrA
Jul 17, 2008, 07:16 PM
Hi all,

The settings app has a vertically stripey background. How can I use this as a background to a UIView?

Thanks.



Enuratique
Jul 17, 2008, 07:23 PM
Hi all,

The settings app has a vertically stripey background. How can I use this as a background to a UIView?

Thanks.

As far as I know, that's the background for a grouped UITableView... I don't know if there's any way to get that background for a regular UIView.

MrA
Jul 17, 2008, 07:33 PM
^ That's unfortunate. :( I guess I could recreate it using core graphics, but I'd like something more "standard".

EDIT: Done... the non-standard way. I just make a 7x1 PNG with the pattern, loaded it with UIImage and used drawAsPatternInRect: to draw it in the drawRect method of my UIView. I'm posting here for reference in case anyone needs to do the same.

galarneau
Jul 17, 2008, 09:46 PM
myView.backgroundColor = [UIColor groupTableViewBackgroundColor];

MrA
Jul 18, 2008, 06:24 AM
myView.backgroundColor = [UIColor groupTableViewBackgroundColor];

Thank you! It's exactly what I wanted.