开发者

How to use the default background image for iPhone UIView?

How can I use the default backgro开发者_如何学运维und image for a UIView?


theView.backgroundColor = [UIColor groupTableViewBackgroundColor];


You can do something like this with UIView class:

[yourview setBackgroundColor:
  [[UIColor alloc] 
     initWithPatternImage:[UIImage imageNamed:@"yourpattern.png"]]];

I always prefer using Interface Builder and just put a UIImageView occupying all UIView and send that UIImageView to back though...


if you are using Interface Builder you can choose "Group Table View Background Color" in the inspector of your UIview.

i just found out this when I read the above answer to your problem (i was trying to do that exatly :P)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜