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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:42:06+00:00 2026-05-29T14:42:06+00:00

I have a storyboard enabled App with a TabBarController where I have added viewcontrollers

  • 0

I have a storyboard enabled App with a TabBarController where I have added viewcontrollers through the interface builder.

Then I followed the iDevReceipes post to add a custom button in the center, which hide my third or center tab bar item with a custom button.

I’m not able to make the TabBarController select the middle tab when a user clicks the button. I wired the button with a selector and within the method I added a code which was supposedly a solution which worked for many on Stack Overflow i.e self.tabBarController.SelectedIndex = 2; this was called in viewWillAppear

This is somehow not working and selecting the correct tab. I had a NSLog inside the method of the button and I found out the button works but the tab is not getting selected.

The tabbarcontroller has a class with nothing inside this.

  • 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-29T14:42:07+00:00Added an answer on May 29, 2026 at 2:42 pm

    You have the right idea, but you need to use a setter method and not set the property directly; this is one instance where it does make a difference. Also, I may be misunderstanding you, but you need to call this code in the selector for the button, not in the viewWillAppear method. Here’s the code you’ll use to select the middle index.

    [self.tabBarController setSelectedIndex:2];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

consider the following scenario: I have a storyboard-based app. I add a ViewController object
WP 7.5 app. I have two Storyboard animations - one on image and another
I have a WPF storyboard that I want to step through frame-by-frame (for a
In my app I have set the storyboard to allow only horizontal and inverted
I have storyboard and implement master detail application app ,when i assign manuel class
Does anybody know if it is possible to have a storyboard in an App
I'm working on an iOS5 app using storyboard, and I have a method in
i have a tabBarController application and using .xib files for the interface not the
I have 2 storyboard files in my app and I'd like to transition between
I have a storyboard based app with a navigation controller as the initial view

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.