Problem is navigating through views of iPhone application (using push/pop viewcontroller)
<p>Here is the scenario. I have 4 view controllers v1, v2, v3, v4 which are displayed in 4 tabs of iPhone (using UITabbarcontroller). now I push another view sv1 to v1 (while I am viewing v1, I use pushviewcontroller like [appDelegate.nv pushViewController:sv1 animated:YES]). nv is UINavigationController init with rootviewcontroller, v1.</p>

<p>Now if I press v2 tabbar (while I am viewing sv1), and then press v1 I see sv1. However, I do not want this behavior. I want to show v1 instead of sv1. How can I remove sv1 from its parent's view when v2 is clicked?</p>

<p>I have tried using [self.navigationController popToRootViewControllerAnimated:NO]; from viewWillDisappear method of sv1 and it is not working (it goes back to v1 but all messed up, like navigation bar is not drawn and tabbar icon for v1 is not shown, the whole v1 view seems to be broken).</p>

<p>Could anyone let me know how can I fix this problem?</p>

<p>Thanks.</p>
