Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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,

like image 658
Mona Avatar asked Mar 02 '26 20:03

Mona


1 Answers

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];
like image 186
rob mayoff Avatar answered Mar 04 '26 11:03

rob mayoff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!