I am facing a problem on UINavigationController…
I have this hierarchy
UINavigationController
|- root controller
|- ViewController A
and I have a button in ViewController A doing something and push ViewController B, but I want to remove ViewController A before adding ViewController B
So the hierarchy is going like this after the process
UINavigationController
|- root controller
|- ViewController B
It supposed to be sliding from ViewController A to ViewController B, but if you press back, it return to root Controller
Thank you in advance.
You should use the setViewControllers method of the UINavigationController and simply add as an array the root and viewController B