If you would like to avoid to set the background image of main view controller through Interface Builder, you can use a different way and delete the UIImageview object from Interface Builder:
1 2 3 4 5 |
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"backgroundImage.jpg"]]; } |
You may use viewDidLoad
as well but viewWillAppear
avoid some flickering. With Xcode 3.2.5 is not possible to use the pattern yet.