Moving existing segue (s)

I want to swap one view controller for another in an existing Xcode iOS storyboard, but I would rather not recreate segues. Can I move or adjust the destination of an existing segment?

+7
source share
1 answer

I believe you need to create a new segue (s), but it's as simple as controlling the drag and drop between the segue source and your new scene. And if your code does everything that requires a storyboard identifier (e.g. prepareForSegue or performSegue ), then just apply the same storyboard identifier for your new session, and you don't need to change the code. If you use a custom segment, you can just use the same segue class, so you do not need to change the code just because the target has been changed. And if the source of your segue is a button or something like that, when you make a segue to a new scene, your old segue is automatically deleted, which simplifies the process.

In short, you probably need to recreate segues, but you probably don't need to change your code too much to support this.

+2
source

All Articles