I want to drag a segue from my viewcontroller, to itself. So I can push "infinite" instances of that particular view controller.
I know how to do this in code (I.e instansiate the view controller programmatically). However, I want to use segues as far as possible.
I've found a few "hacks" for making segue to self in storyboard, but I don't like hacks, so my question is;
Is there a clean way to make a segue back to self in the Storyboard? I dont want to drag it from a button or such, I just want a generic segue that i can use with:
[self performSegueWithIdentifier:@"segueIdentifier"]
Thanks.
You can do this in the storyboard itself. Drag a Storyboard Reference from the Object Library, and then control drag from your view controller to the storyboard reference to create a segue, and select the type of transition. Then with the storyboard reference selected, make sure it's attributes in the inspector are set to the same storyboard file, and the same view controller referenced by it's storyboard ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With