I have the following code in my viewWillAppear:
- (void) viewWillAppear:(BOOL)animated{
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]];
[super viewWillAppear:animated];
}
However, why is it that when the first time it loads, I can see a white gap at the bottom of the screen? The background.png size is 640×960 pixel. This gap will disappear if I navigate to another view controller and go back to this view controller. This is the first view that is loaded when the app first launches. Anyone have any clue why this could happen?
Here’s a screenshot:

UPDATE:
It seems that 20px white gap is from the MainWindow.xib, not sure why we can still see it, while I already have added the view as a subview, it should cover all. And why does it cover all after it gets back from another view?
Here’s a sample project that you can download to show the issue
I am guessing you want to set the background view for your entire flow of views.
Just set
and