Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can i handle UIInterfaceOrientationPortraitUpsideDown for UINavigationController in iPhone iOS6
    text
    copied!<p>I know that: By default, an app and a view controller’s supported interface orientations are set to UIInterfaceOrientationMaskAll for the iPad idiom and UIInterfaceOrientationMaskAllButUpsideDown for the iPhone idiom. So when I created a new project with Single View Application template, to perform all orientation in iPhone i add two method below to ViewController.m. And it work!</p> <pre><code>- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskAll; } - (BOOL)shouldAutorotate { return YES; } </code></pre> <p>Then i changed some codes in method below of AppDelegate.m to change the root view of application from UIViewController to UINavigationController</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil]; } else { self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil]; } if(myNavigationController == nil) myNavigationController = [[UINavigationController alloc]initWithRootViewController:self.viewController]; self.window.rootViewController = self.myNavigationController; [self.window makeKeyAndVisible]; return YES; } </code></pre> <p>After that, i can't handle the UIInterfaceOrientationPortraitUpsideDown in iPhone iOS6 simulator. How can i resolve that? I tried to search a bit of code in older topic but it still not work. </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