iphone-uiview-background
I am new to iPhone development. I have one XIB file, the login page (a form).
Now I want to set the UIView
background image.
When I supply an image from Interface Builder then there is no effect, and when I set it from the code then also no effect.
self.view.backgroundColor = [UIColor colorWithPatternImage:
[U开发者_如何学编程IImage imageNamed:@"srk_ipad_Homepg.png"]];
I don't want to use a UIImageView
because when I place an image, all my controls are hidden behind the UIView
.
You can use UIImageView to set a background without harm, you just have to move it to the top of the view hierarchy. Look at this splashscreen view:
And this is the view's hierarchy tree:
This will prevent your controls from being covered.
精彩评论