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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:57:44+00:00 2026-06-09T18:57:44+00:00

currently working on an app at work that uses a tab bar controller. The

  • 0

currently working on an app at work that uses a tab bar controller. The app will not rotate to landscape mode at all – all views inherit from a baseVieController, and in here I have implemented:

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

Now I know a tabBar controller will not rotate unless all its subviews support the orientation the view is trying to rotate to – my question is this: If I do not implement the – (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method in all subviews, will it lock these subviews to portrait mode, even if I do not specify this as a desired orientation? Therefore locking the whole tabBar controller to portrait. I know similar questions have been asked before, but I couldn’t find the answer to this specific question. Thanks in advance.

  • 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-09T18:57:45+00:00Added an answer on June 9, 2026 at 6:57 pm

    You can rotate the view, just needs to over ride like below:
    Just add the code in the view controller class where you want rotation on (here it is for “SampleClassName”)

    @interface UITabBarController (rotation)
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
    @end
    
    
    @implementation UITabBarController (rotation)
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    
        if ([self.selectedViewController isKindOfClass:[UINavigationController class]])
        {
            UINavigationController *navController = (UINavigationController *) self.selectedViewController;
            if ([[navController visibleViewController] isKindOfClass:[SampleClassName class]])
                return YES;
        }
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    }
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app that currently just uses a listview for a menu,
I am currently working on an iPhone app that will have a user log
currently, i am working on an app that uses Core Data. One of my
One part of an app I'm currently working on will work as a tuner.
I'm currently working on an app that lets the user choose an MP3 audio
I'm currently working on an app that is being created using Ironspeed Designer. It's
I'm currently working on an app that allows the user to draw pixelated images
I'm currently working on an app for a customer of mine and it will
An app I'm currently working on uses Entity Framework 4 which connects to a
I am currently working on an iPhone app which uses CoreData to save some

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.