Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First you should use methods for the iOS6 presented in <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html" rel="noreferrer">UIViewController documentation</a> if you are making your app for iOS6. Orientation method like <code>shouldAutorotateToInterfaceOrientation</code> is deprecated in iOS6, alternate method for iOS6 is <code>shouldAutoRotate</code>. You should only use the old method if your app is supporting also iOS5.</p> <p>Second If you are using <code>UINavigationcontroller</code> in your application and you need to have different interface orientations then navigationController could mess up the interface orientation in the application. Possible solution (worked for me) is to implement a custom <code>UINavigationController</code> and override the interface orientation methods within that custom <code>UINavigationController</code> class, this will make your viewControllers rotate according to the orientation you set because your controllers are pushed from the <code>UINavigationController</code>. Don't forget to add those methods in your particular viewController also.</p> <p><strong>CustomNavigationController.h</strong></p> <pre><code>@interface CustomNavigationController : UINavigationController @end </code></pre> <p><strong>CustomNavigationController.m</strong></p> <pre><code>@implementation CustomNavigationController //overriding shouldRotate method for working in navController -(BOOL)shouldAutorotate { return [self.topViewController shouldAutorotate]; } -(NSUInteger)supportedInterfaceOrientations { return [self.topViewController supportedInterfaceOrientations]; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return [self.topViewController preferredInterfaceOrientationForPresentation]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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