If you ever need to add a image as background for an UIView then do it like this (Make sure the image is in your app’s resource bundle):-
- (void)viewDidLoad { self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"MyBackground.png"]]; }
There might be need at several stages of iPhone application development to insert a new view on top of other views. This can be achieved by setting the zPosition value of the view in question. If a View has a zPosition that is bigger than another views zPosition it will appear on top of the other view.
Read the rest of this entry »