I have an application that contain three viewcontrollers
Mapview
is rootviewcontroller
mapview -pushviewcontroller - listview,
listview - pushviewcontroller - mapview,
1st conditon
mapview -pushviewcontroller - cityview and cityview - pushviewcontroller - mapview
2nd conditon
listview -pushviewcontroller - cityview and cityview - pushviewcontroller - listview
order of viewcontroller like this
mapview-listview, mapview-cityview, listview-cityview
the problem is i am using [self.navigationController popToRootViewControllerAnimated:YES];
but it works only on 1st condition not for 2nd condition
when i use this in the 2nd condition it show mapview again
ie. listview pushing successfully to the cityview and i want to pop back to the listview but it back again to the mapview not to the listview
even i also try this
[self popToViewControllerAtIndex:1 animated:YES];
but again it shows the same problem.
I have tried pretty much everything I have found in forums.
Thanks in advance!