since upgrading to iOS 6 (and the latest version of XCode) I face the following problem: the AR view is always rotated 90 degrees clockwise. I implemented the shouldAutorotateToInterfaceOrientation() method like this:
if (shouldAutorotateToInterfaceOrientation) { NSLog(@"shouldautorotate = YES"); } else { NSLog(@"shouldautorotate = NO"); } if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { NSLog(@"UIInterfaceOrientationLandscapeRight"); } if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { NSLog(@"UIInterfaceOrientationLandscapeLeft"); } if (interfaceOrientation == UIInterfaceOrientationMaskPortraitUpsideDown) { NSLog(@"UIInterfaceOrientationMaskPortraitUpsideDown"); } if (interfaceOrientation == UIInterfaceOrientationPortrait) { NSLog(@"UIInterfaceOrientationPortrait"); }
/* To support autorotation within the architect view, simply tell the architect view if it should rotate into the new interface orientation */ if (_architectView) { ; } return shouldAutorotateToInterfaceOrientation; }
I also tried different versions of this method like:
/* To support autorotation within the architect view, simply tell the architect view in which interface orientation the device is going to change */
if (self.architectView) {
;
}
}
of your View Controller.
This sollution will work on iOS 5 and iOS 6.
If your Application is not rotating as expected, please make sure that you have selected all your supported orientations in your targets summary section in Xcode (more details).
Christian