I am trying to implement a segue programmatically.
My story board looks like this:
https://i.stack.imgur.com/VFkKx.png
The first segue between the first two screens is done by connecting the Login button to the next screen (so not completely programmatically), and it works fine.
The issue is with the "secondSegue", which I tried doing programmatically. It simply does not work and there is no error message appearing.
I connected the 'Load this Screen' button to the following action in the Second Screen's view controller:
@IBAction func openThirdScreen(_ sender: Any) {
performSegue(withIdentifier: "secondSegue", sender: nil)
}
But the screen isn't opening and there is no error.
All the proper IBOutlets seem connected so I don't know what the issue could be.
I put a print statement in openThirdScreen(), and it prints, but a print statement in the third screen's View Controller's viewDidLoad() does not print, even though I made sure the third screen was connected to a view controller.
I had overridden
performSegue()
earlier in order to do more with the segue but it was not working so I removed it for simplicity.Please let me know what I messed up. Sorry if this is a stupid question, I'm very new to XCode and I couldn't find anyone online with the same issue.
Let me know if there are more screenshots that are necessary to answer my question.