Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>can you remember any details about your app? I think it might be related to iOS 6's orientation API changes. I was having the same problem, as well as suffering from some unintuitive orientation behaviours.</p> <p>Specifically, my app specified <code>UIInterfaceOrientationMaskPortraitUp</code> as the only permissible orientation in both the Info.plist and also in the root UIViewController's <code>supportedInterfaceOrientations:</code> implementation. I was also returning <code>NO</code> all the time for <code>shouldAutorotate</code> from my root UIViewController. I was using the UIDevice's orientation to determine how to present my child UIViewControllers and setting the status bar orientation with a function of the type of UIViewController being presented and the UIDeviceOrientation.</p> <p>This was causing a fairly straightforward but on iPad (this is an iPhone app) whereby when started from a landscape-oriented launchpad the presented UIViewController (and status bar) would be oriented perpendicular to the window frame, and would not rotate back.</p> <p>It also caused some very bizarre intermittent orientation / window frame bugs on iPhone 3GS where the frame of the RootViewController was being given some stupid dimensions way larger than the device.</p> <p>What I changed (in my root UIViewController):</p> <pre><code>- (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } - (BOOL)shouldAutomaticallyForwardRotationMethods { return NO; } </code></pre> <p>I also no longer use the device orientation to determine the correct orientation, relying solely on the class of UIViewController being presented (decided by the navigation). This had the expected effect of solving the straightforward iPad orientation bug, but I have seen no instances of the bizarre intermittent bug OR the keyboard bug you were also having.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload