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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:52:26+00:00 2026-06-03T04:52:26+00:00

I have created an app using Storyboards, and have designed it to be landscape.

  • 0

I have created an app using Storyboards, and have designed it to be landscape.

In the view controller.m file I have placed the following code:

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

I have tried a million variants of that code as well, all with the same result.

In addition, I have changed the supported orientations in the info.plist, and of course made the storyboards landscape as well. However, when I simulate, the initial launch is in landscape, then the sub navigation windows snap back to portrait. So, my question is, how can I override the portrait default when using storyboards (meaning, no nib)? I am new to making apps – so it’s probably something oh so simple for you guys and your huge brains, so I figured it was worth asking. I am ready to accept your laughter and pointed fingers for my newbish behavior. =]

  • 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-03T04:52:28+00:00Added an answer on June 3, 2026 at 4:52 am

    Did you associate your custom controller class (where you have override the shouldAutorotateToInterfaceOrientation method) to your scene in storyboard? If not you need to make sure you are referencing this class in the custom class section of the identity inspector of your scene in your storyboard editor.

    I like to use this instruction in the shouldAutorotateToInterfaceOrientation method to make sure only landscape is supported:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        return UIDeviceOrientationIsLandscape(interfaceOrientation);
    }
    

    You can take a look to this tutorial as an introduction to storyboard in ios5 : http://blogs.interknowlogy.com/2012/01/16/introduction-to-ios-5-storyboards-part-1/

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

Sidebar

Related Questions

I have created a quiz app using XML. My XML code: <item> <question type=singleChoice>
I have created a QDialog based app using Qt Creator and all is well
Background: I have created a CRUD web app using a java based RAD tool
I have created a simple web app/form using google app engine. the site is
I have a question. I just created an app using WPF. and trying to
I have created a MazeSolver android app for a school project. I am using
I have created an animated game app, In which I am using NSTimer to
I am using the jquery ui datepicker in my app. I have created an
Actually, in my app, I have created a graph using achartEngine . In these
I've created an app that shows 8 buttons in coverflow using icarousel.i have to

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.