Reputation: 530
Ok so as seen in this picture progression, I have a home screen with a button named "Songs" on it. When this is pressed, it loads a new Nib and .h and .m files as seen in the middle picture. Then the back button brings us back to the home menu.
The problem is when I load that new view it shifts everything up 20 pixels (around how much the status bars are). Does anyone have any idea why this is. Let me know. I can provide code too.
Upvotes: 3
Views: 269
Reputation: 29524
I've had this problem before. The only way I could remedy it was to set each new view I created to the size of the screen. Here's how I did it:
CGRect fullFrame = [[UIScreen mainScreen] applicationFrame];
self.view.frame = fullFrame;
Upvotes: 3
Reputation: 16024
The problem is probably that wantsFullScreenLayout
is set to YES
somewhere. Check your UIViewController
s.
Upvotes: 2
Reputation: 16719
You're probably adding the view to the window with the frame (0,0, 320,460). So add 20 pixels to the y coordinate. The better choice would be using the UIViewController instead.
Upvotes: 1