Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 Screenshot from IOS7 and lower versions of iPhone

Screenshot from IOS7 iPad Screenshot from IOS7 iPad

like image 358
ios_dev_jack Avatar asked Oct 03 '22 20:10

ios_dev_jack


1 Answers

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))

like image 109
Danoli3 Avatar answered Oct 08 '22 01:10

Danoli3