Mo Moosa
Mo Moosa

Reputation: 947

Skipping view controllers in a UINavigationController stack

Is it bad practice to skip view controllers in a navigation stack?

In my example I have a UINavigationController (which is being presented modally) with three UIViewControllers (firstViewController, secondViewController and thirdViewController), most of the time the user will be accessing firstViewController, maybe tapping a row which will then load secondViewController and so on, but what if in some circumstances I want to load the second or third view controllers immediately but still keep the first view controller in the stack, so that the user can still go back to the firstViewController.

I can do this but it doesn't feel right - is this something I should avoid doing?

Upvotes: 1

Views: 99

Answers (1)

Kevin
Kevin

Reputation: 56089

Yes, it's called deep-linking, and it's perfectly fine. It's quite commonly done for things like coming from an external URL or push notification.

Upvotes: 2

Related Questions