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 9236791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:22:58+00:00 2026-06-18T07:22:58+00:00

Currently I have only portrait mode in iPhone application. I would like to permit

  • 0

Currently I have only portrait mode in iPhone application. I would like to permit landscape mode for one controller in application but unfortunately I’m not able to make it work.

I have these settings in my plist file:

<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
</array>

And I implemented these methods in my controller:

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAllButUpsideDown;
}

-(BOOL)shouldAutorotate
{
   return YES;
}

I use navigation controller in the app so I realize that it might be the problem. I subclassed the UINavigationController and implemented again shouldAutorotateToInterfaceOrientation, supportedInterfaceOrientations and shouldAutorotate in the same way as above. Of course for I use subclassed navigation controller to show the controller which should have ability to rotate. I also tried to overwrite the methods of navigation controller by category but it also doesn’t work.

I don’t work on the application from the beginning, I inherited the codes. If there is some possibility how to restrict landscape globally it might be my case. For testing I use iPhone 6.0 simulator but my deployment target is 5.0. I appreciate any tips / help.

  • 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-18T07:22:59+00:00Added an answer on June 18, 2026 at 7:22 am

    iOS6 also requires that you set a rootViewController for your window rather than adding the controller’s view as a subview.

    If you are doing something like this:

    [window addSubview:someController.view];
    

    then you can try changing it to this:

    [window setRootViewController:someController];
    

    Also look at this link. For ios6, Apple introduced these two methods :

    supportedInter
    
    1. faceOrientations:
    2. shouldAutorotate

    Hope it helps.

    Shumais Ul Haq

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

Sidebar

Related Questions

I have an application which normally is a portrait app and only show landscape
I have an ICollection that I know will only ever have one member. Currently,
I have a wordpress application thats currently the only application on the domain. Now
I have an iPhone application that I am currently converting to a universal binary
Ok so I currently have 3 views and I need only one of them
I have an app that is in portrait mode, but some screens should have
I have an iphone app, with a view (well multiple but let's say one
Is there a way to create a resource qualifier for landscape mode, but only
I currently have a table which only has a single editable column. I have
I have to leave in a DataTable only records with dates currently not present

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.