I present a UIViewController modally but would like to push another ViewController from the modal view. How can this be done as pushViewController does not work from a modal view. Thanks
+2
A:
Use a UINavigationController as the view that you show modal. You can then push onto that controller.
Mike
2010-05-24 13:30:09
Thanks, this does work, but the push is not being animated despite setting animated to YES
Run Loop
2010-05-24 13:48:38
Post your code, it should work...
Mike
2010-05-24 13:50:26
The reason it did not animate is because the navigation controller did not have a root viewcontroller. I have used a diff approach as below.
Run Loop
2010-05-24 14:11:35
A:
I have used a slightly different approach than Mike's suggestion. I create a navigation controller (NC) and init it with a root viewcontroller of the view controller (VC) I want to present modally. I then present the nc modally. I can then successfully push from the VC when needed.
Run Loop
2010-05-24 14:10:23
Maybe I wasn't being clear, but that's the same approach I described. I assumed that you would be setting the root as you can't display a nav controller without anything on its stack. That would be the cause of why you weren't seeing any animation. The first view put on the nav controller's stack (the root view) is not animated.
Mike
2010-05-24 14:56:26