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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:45:14+00:00 2026-06-14T00:45:14+00:00

I have a UITabBar application with embedded UINavigation for some of the views. On

  • 0

I have a UITabBar application with embedded UINavigation for some of the views. On one specific navigationview I am displaying graphs/charts and it would be better to display them in landscape as if the iPhone was rotated to the left or right. The rest of the app is better suited to portrait. So I want to “force” the views containing graphs to load in landscape regardless of how the user has the device physically rotated. I’ve tried:

#pragma mark - Rotation
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}

But this does not seem to do anything to the view. If I select the “Landscape Left” icon in the “Supported Interface Orientations” for my target then it allows the entire app to re-orientate on rotation of the device. Is there a way to lock my app in portrait for all normal views and lock in landscape for my views containing graphs such that the app ignores the actual device orientation?

  • 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-14T00:45:15+00:00Added an answer on June 14, 2026 at 12:45 am

    Firstly I am using iOS 6 SDK.

    I am using a custom TabBar Controller.
    and controlling the orientation of that TabBar Controller by the below set of codes

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        // You do not need this method if you are not supporting earlier iOS Versions
        return [self.selectedViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
    }
    
    - (NSUInteger)supportedInterfaceOrientations
    {
        return [self.selectedViewController supportedInterfaceOrientations];
    }
    
    - (BOOL)shouldAutorotate
    {
        return YES;
    }
    

    And the view controller should contain

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
        return UIInterfaceOrientationIsLandscape(orientation);
    }
    

    This is what I did and was able to lock a view to landscape or portrait (in my case). To force may be you can put a alert view stating the user to turn the device to landscape and show him the graph. Just a suggestion.

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

Sidebar

Related Questions

I have uitabbar application and I Want to rotate just one ViewController with chart
I have a UITabBar Application with two views that load large amounts of data
I have an application made by a UITabBar with three tabs. One of these
I have a UITabBar based application, on one TabBar Button I have a navigation
I have a UITabBar which controls multiple Views and I would like to hide
I have a UITabBar with 2 views. One view contains a UITable. When I
I have a UITabBar + UINavigationController application which often needs data from the internet.
I have a UITabBar in my application with three tab bar items. At certain
I have a login screen for a UITabBar application where users are divided into
I have a UITabBar in the detail view of my navigation based application. I

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.