Ack! I had tab rotation problems that were finally resolved in iOS 5, but iOS 6 and xcode seem to have broken things ... this is what I have:
Target information about the application includes: Supported interface orientations - Portraits, Landscape on the left, Landscape on the right
Each Single View in the application has the following methods:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return ((interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown) && (interfaceOrientation != UIInterfaceOrientationLandscapeLeft) && (interfaceOrientation != UIInterfaceOrientationLandscapeRight)); } else { return YES; } } - (BOOL)shouldAutorotate { NSLog(@"am I called1?"); return NO; } -(NSUInteger)supportedInterfaceOrientations{ NSLog(@"am I called?"); return UIInterfaceOrientationMaskPortrait; }
In views that are not part of the tab bar, rotation is blocked. In ALL views on the tab (there are 5), the application never calls ShouldAutorotate and therefore rotates. It seems to be supported .InterfaceOrientations is called once when the view is loaded, but not when it appears if I switch between the views because I get an NSLog, but it seems to ignore the MaskPortrait parameter.
I need to leave the landscape included in the target, because I have one view of the video player that needs to be rotated (and it does it, great)
Is this a tab error in iOS 6? Do I need to turn off the rotation of views in different ways? Orientation worked fine in authorized interface in ios 5
I was on it for a while
Thanks Zack
objective-c rotation ios6 uitabbarcontroller
Zachary Fisher Sep 21 2018-12-12T00: 00Z
source share