On Jun 15, 2017, at 12:45 , Steve Mills <[email protected]> wrote:
> 
> What's the best way to programmatically choose which view controller will be 
> used to segue to? The storyboard was initially set up to segue to a 
> particular view controller, but now I want to choose a different target 
> depending on a user setting.


Can’t you solve it by putting two different segues in the storyboard, from the 
same source VC?

If you’re initiating the segue in code, then choose which one to perform at 
time of initiation.

If you’re initiating the segue from a UI element that is configured with one 
specific segue identifier, I’d try overriding [UIViewController 
performSegueWithIdentifier:sender:] and invoke super with either of two 
different segue identifiers.

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to