On this, my first iPhone project after 30+ years of C++, ever since I went through the tutorial "Your First iPhone Application", the top of my view has been cut off, hidden under the status bar. Meanwhile, the bottom of the screen has a blank area not covered by my test background color. I followed all the tutorial instructions; used Interface Builder. In Interface Builder, the view with test-colored background, appears correctly BELOW the status bar, and fills the whole screen. When run in the simulator or on a device, however, the view is Y pixels higher, hiding partially under the status bar and not filling out to the bottom of the screen.
I didn't do any special X,Y positioning of the view. I would have thought that Interface Builder would have positioned things correctly relative to the status bar, and I would have thought that the tutorial provided code snippets that did things appropriately as well.
It seems to me that I need to compensate by moving the view down. However, I shouldn't need to do this, having followed the tutorial. So I'm wondering what I'm missing.
Just in case, here's my appdelegate code that creates the view controller. Also, there's no special code in the view controller itself, that would be germane to this question.
...
// Create main view controller
mainViewController = [[MainViewController alloc]
initWithNibName:@"MainViewController" //forum note, can't get this to indent right on forum
bundle:[NSBundle mainBundle]]; //forum note, can't get this to indent right on forum
[self setMainViewController:mainViewController];
// Setup the main view
[window addSubview:[mainViewController view]];
...
[window makeKeyAndVisible];
Please advise as to what I'm missing. I searched the forum but couldn't find any comments on this. (Hey, it's happening to everyone and nobody's mentioning it! I don't think so. I must have done something wrong...)
Thanks,
Dr.Lightning