I have a UINavigationController
with the following view controllers
A -> B (B is on top)
Now for some action in B, I want to replace B with C (finally it should be A-> C).
I tried the following: when action occurs in B, I do a [self.navigationController popViewControllerAnimated:NO];
.
In the viewWillAppear
function of A, I check if I need to push C immediately and do so.
The problem is that when C is pushed, the transition animation is a pop-animation (slides from right to left) instead of push.
Looks like the animation applied is getting confused with the earlier pop.
How do I fix this ?
I tried passing YES in the [self.navigationController popViewControllerAnimated:NO];
above but that didn't solve the problem neither