ios85
ios85

Reputation: 2134

Segue/Transition between two views in a storyboard w/o a NavigationController

Is it possible to not use a NavigationController and change views with an animation/segue with a storbyboard. I cant seem to figure out how to accomplish this. I thought it would have been pretty simple but no luck. I just have two views and want to transition without adding a navigationcontroller.

Upvotes: 2

Views: 4398

Answers (2)

Ben Mosher
Ben Mosher

Reputation: 13381

T.J. is right about selecting a modal segue, but -dismissModalViewControllerAnimated: is deprecated in iOS 5+.

You should use -dismissViewControllerAnimated:completion: instead.

With the advent of iOS 6, you may also be able to use 'unwind actions' for dismissing presented controllers with unwind segues.

Upvotes: 2

T.J.
T.J.

Reputation: 3960

Sure, just create the segue and select "modal" in the menu that pops up instead of "push".

When you want to return you do it programmatically with:

    [self dismissModalViewControllerAnimated:YES];

Upvotes: 3

Related Questions