0

I have an easy question : as you can see in the image, how am I supposed to show the "LoginVC" view when I'm in the "SignUpVC" (with the code)?

enter image description here

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
maito
  • 3
  • 4

1 Answers1

0

Create a segue between the views and use the performeSegueWithIdentifier method.

Fred Faust
  • 6,696
  • 4
  • 32
  • 55
  • But when you build a much bigger app, there will be so much segue everywhere no ? – maito Jul 22 '15 at 14:40
  • If you're using storyboards then you should be using segues between each view. You can also add unwind segues. If you want to present view controllers programmatically check out this question and answer: http://stackoverflow.com/questions/27326183/presenting-a-view-controller-programmatically-in-swift – Fred Faust Jul 22 '15 at 14:44
  • @maito You're correct, there will be a lot of segues when the app is big. One solution is to create multiple storyboards and instantiate them from code (or, in the case of iOS 9, use references to link between storyboards). – vp5 Jul 24 '15 at 13:41