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.
You can drag the segue from the trigger to the same view controller. You'll need to drag it to the the yellow box in the top left, on top of the view controller in Xcode 6.
If you try to drag it onto the VC itself Xcode will think that you're trying to add a layout constraint.
You can embed your TableViewController in a Navigation Controller and segue to the Navigation controller.