I have what I think is a simple problem.
I have three views in my app, View1, View2, View3.
I know how to go from View1 to View2, and from View2 to View3, but how do I go from View3 back to View1?
I am using the following method in the View1ViewController.m to go from View1 to View2:
[self presentModalViewController:view2ViewController animated:YES]
And the same thing to go from View2 to View3.
I am including the View2 view controller in the View1 XIB file, and am including the View3 view controller in the View2 XIB file.
I’ve found that if I use [self dismissModalViewControllerAnimated:YES] from View3 I can only go back to View2, whereas I need to go all the way back to View1.
Any help/direction would be greatly appreciated.
Many thanks,
-Sd
Don’t think of calling
-presentModalViewController:as a way of going from one view controller to another; think of it as a way of, well, presenting a view controller modally. If you want to implement navigation, you should take a look atUINavigationController.