Mona
Mona

Reputation: 1073

xcode 4.2 storyboard, segue by code

I'm trying to make the segue between a button created by coding and a view created in storyboard?

(the button is not in the storyboard, it's made inside the viewcontroller .m class)

please help if you know the solution thanks,

Upvotes: 2

Views: 5898

Answers (1)

rob mayoff
rob mayoff

Reputation: 385890

If the current view controller (the one that owns the button) came from the storyboard, you can just use the performSegueWithIdentifier:sender: method of UIViewController, like this:

[self performSegueWithIdentifier:@"mySegue" sender:sender];

Upvotes: 9

Related Questions