iOS6 and shouldAutorotateToInterfaceOrientation


In the documentation there is a hint for IOS6:

So in iOS6 the rotation cannot handle by these method.
Are there any other suggestions, or workarounds available?
Or does anyone know how to get the cached information?

best regards


As iOS 6 is not out yet, it is likely that that quote is under NDA, which means you would be wise to delete that post and ask in the Apple Dev forums.
Honestly though, I don’t know the answer.


I took the this entire code out:

if ([[UIDevice currentDevice] userInterfaceIdiom]==UIUserInterfaceIdiomPad)
return YES;

        return NO;



Under project summary, “Supported Interface Orientations” for the iPhone/iPod I set it to portrait. However, for iPad (below the iPhone Deployment info), I selected Portrait, Landscape Left, and Landscape Right, and that seems to work fine.


Since iOs 7 is officially out, "shouldAutorotateToInterfaceOrientation: " is officially deprecated.
Documentation states that instead of that method we should “Override the “supportedInterfaceOrientations” and “preferredInterfaceOrientationForPresentation” methods instead.”

However, those two method return objects of completely different types: NSUInteger and UIInterfaceOrientation respectively.

In the book we are given following code that we include in the ItemsViewController.m and DetailViewController.m:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)io { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { return YES; } else { return (io == UIInterfaceOrientationPortrait); } }

Can anyone help out and provide new code adjusted for iOS6 ?
Appreciate your time.