Search code examples
iosuistoryboardsegue

Can a UIViewController connect to different multiple UIViewControllers?


Based on the requirements, HomeVC will navigate to different VCs using segues.

I have the following structure:

          |- VC1
 HomeVC --|- VC2
          |- VC3

Can I create multiple segues to each of the VCs?

Example: HomeVC connects to VC1 by a segue.

I drag the yellow icon on top of the HomeVC to VC1 and name it segueVC1 and for VC2 and VC3, I will use the same method.

I would like to know if this is permissible and OK.

Thanks!


Solution

  • Yes, it is permitted, moreover, a very common method to use segues this way. They can ease visualizing navigation between view controllers and help structuring the project.