Drag and drop Segue To Self into storyboards

I want to drag segue from my views manager into myself. Therefore, I can click on "infinite" instances of this particular view controller.

I know how to do this in code (I programmatically program the viewer). However, I want to use segues as far as possible.

I found several β€œhacks” for creating a segue for myself in the storyboard, but I don't like hacks, so my question is:

Is there any clean way to make Segui yourself in the storyboard? I don’t want to drag it with a button or such, I just want a general session that I can use with:

[self performSegueWithIdentifier:@"segueIdentifier"] 

Thanks.

+6
source share
3 answers

You can do this in the storyboard itself. Drag the storyboard link from the object library, and then drag it from the view controller to the storyboard link to create a segment, and select a transition type. Then, by selecting the storyboard link, make sure that the attributes in the inspector are set to the same storyboard file and the same view controller that the storyboard identifier refers to.

0
source

You can drag a segment from a trigger onto the same view controller. You will need to drag it into the yellow square in the upper left corner, on top of the view controller in Xcode 6.

If you try to drag it onto VC itself, Xcode will think that you are trying to add a layout constraint.

-1
source

You can embed your TableViewController in the navigation controller and go to the navigation controller.

-1
source

All Articles