I am new to IOS development and am trying to do something very simple but have not been successful. I looked everywhere but cannot find an answer. I hope someone can tell me what I am doing wrong.
What I'd look to do is put up a sort of splash screen while my program is initializing, verifying credentials, downloading initial database sets, and other initialization. When done, I want to segue from my Init view controller to a new Home view controller screen if successful (or an error screen if initialization failed for whatever reason).
I have separate view controller swift files corresponding to both Init and Home storyboard view controllers. In the storyboard, the only objects on one of them is the label "Init VC". The only thing on the second is the label "Home VC". I have also created a named segue ("InitToHome") between the Init view controller and the Home view controller which I created by control dragging from the top of the Init view controller to the Home view controller.
To programmatically segue between the two I have inserted this code within the Init View Controller viewDidLoad function after my other initialization:
// If everything looks OK, segue to the Home View Controller
performSegue(withIdentifier: "InitToHome", sender: self)
print("performSegue Called")
When I run the program, I don't see any errors and my print statement prints in the console. So I think the performSegue statement was executed successfully. Unfortunately, the view doesn't change - it is still on the Init screen whereas I had hoped to be on the Home screen.
Don't really want to put a button here. What am I doing wrong? Thanks in advance for any help to what I hope is a simple question.
Note: I'm running the latest version of Xcode and MacOs.