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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:58:26+00:00 2026-05-26T10:58:26+00:00

I’m programmatically creating a tab bar based app. In the application:didFinishLaunchingWithOptions (app delegate) method

  • 0

I’m programmatically creating a tab bar based app. In the application:didFinishLaunchingWithOptions (app delegate) method I’ve put:

self.tabBarController = [[[UITabBarController alloc] init] autorelease];

SearchViewController *search_vc = [[[SearchViewController alloc] init] autorelease];
SearchBookmarksViewController *search_bookmarks_vc = [[[SearchBookmarksViewController alloc] init] autorelease];
ItemsBookmarksViewController *items_bookmarks_vc = [[[ItemsBookmarksViewController alloc] init] autorelease];
AboutUsViewController *aboutus_vc = [[[AboutUsViewController alloc] init] autorelease];

UINavigationController *search_nav = [[[UINavigationController alloc] initWithRootViewController:search_vc] autorelease];
UINavigationController *search_bookmarks_nav = [[[UINavigationController alloc] initWithRootViewController:search_bookmarks_vc] autorelease];
UINavigationController *items_bookmarks_nav = [[[UINavigationController alloc] initWithRootViewController:items_bookmarks_vc] autorelease];
UINavigationController *aboutus_nav = [[[UINavigationController alloc] initWithRootViewController:aboutus_vc] autorelease];

NSArray vc_stack = [NSArray arrayWithObjects:search_nav,search_bookmarks_nav,items_bookmarks_nav,aboutus_vc,nil];

tabBarController.viewControllers = vc_stack;

[self.window addSubview:tabBarController.view];

SearchViewController is basically a search form showing results in a UItableView with rows which when selected show details about the chosen row. User can also press a “View Photos” button that push a view controller with a UIImageView to show some photos.

Now when working on the photo view I had to handle landscape orientation which seems not working easily in tab bar applications. Can you help about what to do exactly to allow this photo view controllers to handle landscape orientation ?

I’ve been told to make shouldAutorotateToInterfaceOrientation method to return YES in every view controller thus making any view to allow landscape orientation OR to subclass TabBarController and this last solution could cause my app to be rejected by Apple. So I’m a bit confuse about what to do exactly…

Thx in advance for your help!

Stephane

  • 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-26T10:58:26+00:00Added an answer on May 26, 2026 at 10:58 am

    I’ve used both of the options you mention.

    1. make shouldAutorotateToInterfaceOrientation method to return YES in every instanced/subclassed view controller: For this to work you need to make sure that every single view controller has its shouldAutorotateToInterfaceOrientation method to return YES. One option is to CMD+Shift+F to search in the whole project for “: UIViewController”, this will show you a list of all the headers files that are inheriting from UIViewController, so set shouldAutorotateToInterfaceOrientation to YES in every implementation file corresponding to this headers. (This because sometimes you may’ve included a third party code that has some classes that inherits from UIViewController and that you omit to set shouldAutorotateToInterfaceOrientation to YES there)

    2. subclass TabBarController: Apple documentation says that “This class is not intended for subclassing.” so it would be better to avoid this option, I have used and it works, but you will always has the possibility of been rejected by Apple. (Maybe not the first time, but on any upgrade)

    Anyway, I think Apple doesn’t encourage tabbar applications to be displayed in landscape mode because tab bar took a lot of the space on the screen. So it would be better to consider the architecture of your application to see if a tabbarcontroller is really needed or create your own tabbarcontroller control like Twitter app on iPhone. This way you can reduce the height of the tab bar when in lanscape.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am trying to loop through a bunch of documents I have to put
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.