RockBaby
RockBaby

Reputation: 381

Perform dismissModalViewControllerAnimated or popViewControllerAnimated based on segue identifier?

I have 2 views connecting to 1 view, 1 view is push and another is modal. Is it possible to get the segue identifier and perform either dimiss or popview?

Thanks.

Upvotes: 0

Views: 741

Answers (1)

rob mayoff
rob mayoff

Reputation: 385970

You can't get back to the segue that pushed/presented you unless you store it yourself.

However, you can look at your presentingViewController and navigationController properties. If you were pushed, presentingViewController is nil and navigationController is non-nil. If you were presented, presentingViewController is non-nil and navigationController is nil.

Upvotes: 2

Related Questions