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

  • Home
  • SEARCH
  • 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 7882423
In Process

The Archive Base Latest Questions

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

Having problems changing the initial tab bar selection on an application (i.e. the middle

  • 0

Having problems changing the initial tab bar selection on an application (i.e. the middle tab is selected on app launch rather than the leftmost tab). The app uses storyboards and the tab bar controller was added later on in development via the storyboard method.

tabBarController.selectedIndex = 1;

the above code doesn’t work (because I don’t have a custom view controller connected to my tab bar, just the default UITabBarController):

Done some googling and looked at many different resources and haven’t quite found a solution for an app that wasn’t initially created using Apple’s template Tab Bar Application.

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

    Since this is the initial view controller, and is not a subclass, you need to set this in your appDelegate.

    In AppDelegate.m, add the following to your application:didFinishLaunchingWithOptions: method:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        // Override point for customization after application launch.
    
        // Select the left-most tab of our initial tab bar controller:
        UITabBarController *tabBar = (UITabBarController *)self.window.rootViewController;
        tabBar.selectedIndex = 0;
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using InAppSettingsKit for my app but I'm having problems changing the text color
I'm having problems with changing my configuration file config.php . At the moment, I'm
I'm having problems with an app on the Samsung S I9000. The buttons on
I'm having some problems changing the DataTemplate that is used for a TreeViewItem when
I'm working on a small game and I'm having problems changing my Activity's content
I'm having problems dynamically changing the text in a TextView in a PopupWindow in
I am having problems changing the 'from' email header in the following script. Everthing
I am trying to plot country positions in OpenLayers, and am having problems changing
I've been having problems lately with date conversion lately. Some workstations my application run
While using the Nimbus L&F feel in Java, I am having problems with changing

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.