lundi 17 novembre 2014

Status bar rotates but application does not, on iPhone- works fine on iPad?


Vote count:

0




Long time lurker, always tried very hard to search and have found many answers this way. This is the first time I have found nothing that fixes my problem. This is also my first solo app, as I am a new developer.


I have two devices- an iOS 8.1 iPhone 6, and an iOS 7 iPad Mini Retina 2.


I am building my first iOS app. It uses storyboards for a UITabBarController with three tabs, each of which contains a UINavigationController and a custom sub view controller (such as a subclass of tabbarcontroller or collectionviewcontroller).


Under Deployment Info: Deployment Target is set to 7.0 and Universal. iPhone and iPad both use the MainStoryboard main interface, with all four Device Orientations checked for both.


My AppDelegate starts with:



UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]];

UITabBarController *initViewController = (UITabBarController *)[storyboard instantiateViewControllerWithIdentifier:@"rootTabBarController"];

NSLog(@"%d %d",initViewController.shouldAutorotate,initViewController.shouldAutomaticallyForwardRotationMethods);

[self.window setRootViewController:initViewController];


Note the NSLog; it prints "1 0".


So from what I can see- the tab bar should auto rotate.


On my iPhone, when I turn the device sideways, the status bar on the top rotates- but the content remains upright. If I hit the Home button and switch back to the app while holding it sideways, everything goes wonky- the content rotates but doesn't rearrange the layout, so it remains vertical, and thus gets cut off and there's a big black section on the side.


On my iPad, though- everything works fine! The application rotates as expected and resizes itself.


What am I doing wrong here? Thank you tremendously for any help.



asked 1 min ago







Status bar rotates but application does not, on iPhone- works fine on iPad?

Aucun commentaire:

Enregistrer un commentaire