Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9086127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:24:46+00:00 2026-06-16T21:24:46+00:00

I am working on iPhone application with both Portrait orientations support (Portrait and Portrait

  • 0

I am working on iPhone application with both Portrait orientations support (Portrait and Portrait UpsideDown).

In earlier XCode4.5.1, I have resolved this issue by:

  • Setting rootViewController in AppDelegate
  • Mentioning shouldAutorotateToInterfaceOrientation like this:

    -(BOOL)shouldAutorotateToInterfaceOrientation:    (UIInterfaceOrientation)toInterfaceOrientation {
    
         return UIInterfaceOrientationIsPortrait(toInterfaceOrientation);   }  
    
  • Mentioning supportedInterfaceOrientation in info.plist file

Now I am doing the same things for newer XCode but in iPhone simulator v6.0 its not supporting rotation properly.

I have tried with these methods as well:

-(BOOL) shouldAutorotate {

  BOOL returnValue = NO;

  int interface =  [self preferredInterfaceOrientationForPresentation];

  if(UIInterfaceOrientationIsPortrait(interface)) {

    // Code to handle portrait orientation
    returnValue = YES;
  }
  else {

    // Code to handle Landscape orientation
    returnValue = NO;
  }

  return returnValue;
}

- (NSUInteger) supportedInterfaceOrientations {

  return (UIInterfaceOrientationPortrait | UIInterfaceOrientationPortraitUpsideDown);
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
  return (UIInterfaceOrientationPortrait |
          UIInterfaceOrientationPortraitUpsideDown);
}

Please guide me how to support both the Portrait orientations for iOS > 4.3 all the versions.

Thanks in advance,
Mrunal

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:24:47+00:00Added an answer on June 16, 2026 at 9:24 pm

    Why Did Orientation Change to Landscape Stop Working in iOS 6?

    Starting in IOS 6.0 there are several orientation changes that stopped my app from rotation out of Portrait.
    The fix for me, and the one applicable here, is that you must setRootViewController on the window in your AppDelegate. The earlier answer offers several suggestions that are all correct, but misses the one item that was relevant for me.

    In application didFinishLaunchingWithOptions, after:

    [window makeKeyAndvisible]
    

    or

    [window addSubview: viewController.view];
    

    You must replace with:

    if([[UIDevice currentDevice].systemVersion floatValue] >= 6.0) {
        [window setRootViewController:viewController];
    } else {
        [window addSubview: viewController.view];
        (or [window makeKeyAndvisible])
    }
    

    You also need to add the new shouldAutoRotate instead of the depreciated shouldAutorotateToInterfaceOrientation, but this was easier to find and less crucial for me.

    Same with making sure all your orientations are specified in your .plist file.

    I did not need to override supportedInterfaceOrientations because I am satisfied with the default orientations (all for iPad UIInterfaceOrientationMaskAll, all but upside-down for iPhone UIInterfaceOrientationMaskAllButUpsideDown).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working with iPhone application in which i am using sqlite database.
I'm working on an iPhone application. I'm using Storyboard. I wanted to have one
I'm working on an iPhone application. I have an object of class Row that
I have created an ios application which supports both iphone and ipad I have
How can make my iphone application is working both single tasking and multitasking. Like
I will be working on an iPhone app with another developer. We both have
Currently i am working in iPhone application, I have create two button and set
I am working on an Iphone application. I am using a StoryBoard. I have
I'm a beginner but have been working really hard to build this application. Working
I have created a setting.bundle in my iPhone app project. Its working fine. An

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.