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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:31:52+00:00 2026-05-25T02:31:52+00:00

My iPhone app has a tab bar controller, and one of the tabs is

  • 0

My iPhone app has a tab bar controller, and one of the tabs is a navigation controller. When the user double taps on the tab, it causes the navigation controller to pop back to the root view.

My problem is that some of the views in my navigation hierarchy have a specific bar button in their navigationItem associated with that view. So I’m programmatically setting the rightBarButtonItem based on what view was pushed to the navigationController. When the double-tap happens, it pops back to the root view, but not to the right button. The button seems to stay the same as the last view popped that had its own specific button.

So I have a mismatch of the root view with a bar button that goes with another view.

Is there a way to detect when the double tap action occurs? In that case I could reset the buttons on the nav bar to the correct ones. I tried doing it in viewWillAppear/viewDidAppear/viewDidLoad methods, but these don’t seem to be called when the tab bar double tap happens.

  • 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-25T02:31:53+00:00Added an answer on May 25, 2026 at 2:31 am

    The safest way to ensure that you always have the right button independent of how the view was made visible (e.g., by popping a child view controller, or by double-tapping the tab bar) is to set the button each time the view becomes visible. Thus, in your root view controller:

    -(void)viewWillAppear {
        //check button, change if desired
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of the tab bar controller tabs in my iPhone app changes what it
My iPhone app has a tab bar controller and on each tab (4 tabs)
My iPhone app is a Tab Bar Application, which has 5 tabs. In each
I've created a small iphone app that contains a tab bar controller that has
My iPhone app has a tab bar controller at the bottom of the view
I have an iPhone app that has four tabs. On Tab 1 there is
I am working on iphone app that has tab bar at the bottom of
I've an Tab-bar based iPhone app. the app consiste of 2 tabs. Each tab
I am creating an iphone app with 5 tabs, each tab has a root
I'm working on an iPhone app that has a UITabBar. Occasionally the tab bar

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.