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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:10:34+00:00 2026-05-17T16:10:34+00:00

I have an app with a tab bar with two tabs. One tab displays

  • 0

I have an app with a tab bar with two tabs. One tab displays a UINavigationController, the other a UIViewController that I have customized.

What I have noticed is that if switch tabs to the UINavigationController tab then navigate a few levels deep in UITableViews, if I click on the current tab on the UITabBar the UINavigationController pops to it’s root view.

I was wondering how this takes place. It does not appear that the UINavigationController is a delegate of the UITabBar or UITabBarController, which would have been one option. The functionality is somehow automatic.

I want to implement a similar action on my UIView in the second tab, so I’d like to figure this out. Thanks!

  • 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-17T16:10:35+00:00Added an answer on May 17, 2026 at 4:10 pm

    What UITabBarController is doing is that whenever you tap a already selected tab, it checks if the UIViewController of that tab is an UINavigationController. If it is, then pop to the rootViewController.

    What you want to do is to set you second tab the delegate of your UITabBarController and check for

    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
    

    When ever that method is fired, check if the viewController is your second tab viewController and that the selectedIndex (of UITabBarController) is 1. If that’s the case, implement your action.

    This works only on iOS 3.0 or later. In versions of iOS prior to version 3.0, this method is called only when the selected view controller actually changes.

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

Sidebar

Related Questions

i'm making app based on tab bar with two tabs. My problem is that
I have an app with a tab bar controller (2 tabs). In one tab
I have an UITabBarController with two tabs: UINavigationController OptionsViewController : UIViewController How can I
I have a multiview application using a tab bar to switch views. One is
I have three views that I switch between using a tab bar, and the
I have a tab bar app that I want to add a banner ad
I have a tabbar-based iOS app with two tabs. When I tab into the
I have a iPad app using XCode4 with Storyboards, that has a Tab Bar
In my app I have a tab bar. And in some views I as
I have a tab-bar and navigation controller application (like Youtube app or Contacts app).

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.