if (!app.statusBarHidden) {
statusBarHeight = 20;
}
return ([UIScreen mainScreen].bounds.size.height - statusBarHeight);
This returned a height of 460 as expected. However, my ad appeared 20pts above the bottom of the screen. I tried everything in Interface Builder from adding the status bar to the nib, taking out the status bar and setting the views frame height to 460, and changing the springs and scales.
What worked is setting the frame in viewWillAppear:
- (void)viewWillAppear:(BOOL)animated { // to fix the controller showing under the status bar self.view.frame = [[UIScreen mainScreen] applicationFrame]; }
http://www.iphonedevsdk.com/forum/iphone-sdk-development/40582-top-view-cut-off-under-status-bar-interface-builder.html
No comments:
Post a Comment