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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:27:28+00:00 2026-06-18T10:27:28+00:00

I have an iPad app that supports UIDeviceOrientationPortrait and UIDeviceOrientationLandscapeLeft. I did include this

  • 0

I have an iPad app that supports UIDeviceOrientationPortrait and UIDeviceOrientationLandscapeLeft.

I did include this method :

    - (BOOL)shouldAutorotateToInterfaceOrientation:        
      (UIInterfaceOrientation)interfaceOrientation
    {
        return (interfaceOrientation == UIInterfaceOrientationPortrait ||
        interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
    }

The issue I have is that I need it to load in the UIDeviceOrientationLandscapeLeft mode, just for the load, because my UI controls will be setup properly. how can I force it only once on load.

One thing I wanna note is that this has to be min iOS 5.

  • 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-18T10:27:30+00:00Added an answer on June 18, 2026 at 10:27 am

    I recently had similar problem, but I wanted to change from Landscape to Portrait by force, I knew in old versions there were built in methods but unfortunately we are never sure when and what is working for us, but I gave this code a try and It worked for me, but my scenario was to forcing from landscape to portrait, which is opposite to your scenario, but anyways it works, here is the code possibly for your scenario;

        -(NSUInteger)supportedInterfaceOrientations
    
    {
        return UIInterfaceOrientationMaskLandscape;
    
    }
    
    -(void)viewWillAppear:(BOOL)animated {
    
        UIApplication* application = [UIApplication sharedApplication];
    
        if (application.statusBarOrientation != UIInterfaceOrientationLandscapeLeft)
        {
            UIViewController *c = [[UIViewController alloc]init];
            [self presentModalViewController:c animated:NO];
            [self dismissModalViewControllerAnimated:NO];
        }
    
    
        [super viewWillAppear:animated];
    }
    

    EDIT working on IOS 6.1 I have added two more methods which I did not add in my previous post, I add now all what is working for my application…

    - (BOOL)shouldAutorotate
    {
    
        return NO;
    }
    
    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
    {
        return UIInterfaceOrientationLandscapeLeft;
    }
    

    the idea is to check the statusbar orietnation and add and dismiss a modalViewController and it works for me to force from one to another orientation.

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

Sidebar

Related Questions

I have this iPad app using Storyboard. There are some file that are marked
I have an iPad app that I would like to make Universal, however this
If I currently have an ipad app that supports ios 5.0 how do I
So we build an iPad App that only supports landscape orientation. This is enforced
I have an iPad app that uses custom fonts though the UIAppFonts elements in
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .
I know that after I have deployed my ipad/iphone app into App Store, it
I have an application that supports iOS 2.x. I am about to revamp this
I've got an iPad app that I absolutely need to have in just landscape,
My app is iPad only, and supports only Landscape View. I have a UIImagePickerController

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.