I have an incredibly unpleasant problem that seems like a mistake, but itβs really hard for me to believe that no one else has come across this. My application root view controller is a UITabBarController where each tab is a UINavigationController. Everything works great.
Now I come to the place where I want to edit the stack, so I rearrange the viewControllers of the current navigation controller, and then do:
[self.navigationController setViewControllers:newViewControllers animated:YES]
The stack is correctly pushed out / pushed to the top-level controller, but the navigation bar does not update to the current view controller and seems to remain the same as with the viewController before the pop. If I do this:
[self.navigationController popToViewController:someViewController animated:YES]
Everything works perfectly. Has anyone ever come across this before? Is there a workaround? Am I doing something wrong?
iphone uiviewcontroller uinavigationcontroller
beinstein
source share