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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:36:13+00:00 2026-05-26T04:36:13+00:00

Ive set a tabbarcontroller in my main window. One of its tabs is a

  • 0

Ive set a tabbarcontroller in my main window. One of its tabs is a navigation controller with a rootview X that pushes to view Y.

The problem is: when the navigation controller has pushed view Y and I tap on the tab corresponding to the rootview X, the app tries to show the rootview X again, when the app should do nothing.

That shouldnt happen, right? The content inside a tab shouldnt change at all if im still on that tab, right?

  • 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-26T04:36:13+00:00Added an answer on May 26, 2026 at 4:36 am

    If you tap on the tab were you currently are, the default behaviour for the embedded navigation controller is to pop to the root view controller. You can change this by setting a delegate to the UITabBarController and overiding the UITabBarControllerDelegate method

    - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
    

    and providing custom behaviour when viewController == tabBarController.selectedViewController (note that you will be receiving the navigation controller, which is a subclass of UIViewController, not the root view controller of the navigation controller).

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

Sidebar

Related Questions

I have a tabBarController xib. I've set the first item's class to a view
I'm building an app that uses a TabBar controller in which one of the
ive got problem with update. here is mysql query.log 25474 Query UPDATE db_mail4u.dMailerQueue SET
Ive been faced with a problem recently that I can't think of a good
Ive had a problem that I cant fix while creating an image carousel in
im trying to open a file using StreamReader and ive to set a Encoding,
I've set the buffer size to the window size to get rid of the
Ive set an in a running service a handler which does operation every X
In one webapplication i have a IHttpHandler that when invoked starts an regular application
Ive just set up some basic models using scaffold with Rails, i've edited the

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.