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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:57:48+00:00 2026-05-24T05:57:48+00:00

I subclassed UITabBarController in order to override shouldAutorotateToInterfaceOrientation: so that I can support landscape

  • 0

I subclassed UITabBarController in order to override shouldAutorotateToInterfaceOrientation: so that I can support landscape mode in certain circumstances. When I run this, the tab bar controller gives me the following message when the overridden method returns NO

The view controller <...0x644f50> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.

Any suggestions on how to get ride of the message other than return YES all the time in shouldAutorotateToInterfaceOrientation?

  • 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-05-24T05:57:50+00:00Added an answer on May 24, 2026 at 5:57 am

    If you return NO, it means that your view controller can’t be displayed on any of the 4 orientations.

    You should think which orientations you want it to support and use the orientation parameter they give you to accept those orientations.

    For example, if I wanted my view controller to support portrait and landscape right, this would be my implementation (This could be reduced to a line, but I’m expanding it for the sake of clarity):

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIDeviceOrientation)orientation{
      if(orientation == UIDeviceOrientationPortrait) return YES;
      if(orientation == UIDeviceOrientationLandscapeRight) return YES;
      return NO;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems that UITabBarController should not be subclassed. How would you recommend that I
I have a UITabBarController that nests a UIView-Subclass (ImageViewer) as it's third tab. In
I have a UITabBarController, and each tab handles a different UIViewController that pushes on
I have a subclass of UITabBarController which i am using so that i can
I subclassed View to get an View on which the user can draw with
I have a subclassed NSTextView that I am manipulating in a separate thread (using
I am simply trying to subclass UIWindow so that I can intercept some notifications.
I subclassed QGraphicsItem and reimplemented paint. In paint I wrote something like this for
The UITabBarController does not allow landscape orientation. So I used a subclass of UITabBarContoller
In my app delegate, I have this method that gets stubbed out automatically, 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.