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.