简体   繁体   中英

Frame issue for Xcode 5 compiled iPhone app in iPad after IOS7 upgrade (works fine in iPhone)

I have an app built for iPhone almost ready to launch. After upgrading to IOS7, the app works fine in iPhone-5, but I am seeing frame issues in iPad and iPad mini (note that this is not an iPad app, I am running the same iPhone app in iPad)

I tried different solutions (lowering by 20 pts - but it does not work. This issue is specific to an Xcode-5 compiled app running in iPad, same running in iPhone has no issue. Also this was working fine is both devices in IOS 6 versions.

I gave View controller-based status bar appearance as NO in plist and also added the following code :

if ([self respondsToSelector:@selector(edgesForExtendedLayout)]){

    self.edgesForExtendedLayout=UIRectEdgeNone;
    self.extendedLayoutIncludesOpaqueBars=NO;
    self.automaticallyAdjustsScrollViewInsets=NO;
}

Could someone give some pointers?

Attaching screenshots for iPhone and iPad (the top area is getting cut-off).

Screenshot from IOS7 and lower versions of iPhone IOS7及更低版本iPhone的屏幕截图

Screenshot from IOS7 iPad IOS7 iPad截图

Set the following in your .plist

Status bar is initially hidden (Boolean) to YES and

View controller-based status bar appearance (Boolean) to NO

And call the following within the application when necessary.

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];

(For example: When a MPMoviePlayerViewController* is returning from playing a video (as the status bar is shown))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM