RunLoop
RunLoop

Reputation: 20376

How to push a UIViewController from a modal view

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

Upvotes: 2

Views: 693

Answers (2)

RunLoop
RunLoop

Reputation: 20376

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.

Upvotes: 0

Mike
Mike

Reputation: 8963

Use a UINavigationController as the view that you show modal. You can then push onto that controller.

Upvotes: 2

Related Questions