I'm dealing with an application with two UIViewControllers. When the application launches, the LoaderViewController is triggered. On that view controller, I am setting up the application for launch and then trying to move into ViewController. The problem is that the prepareForSegue method is called correctly, but it does nothing. I'm trying to do the navigation same way as i've done before. What is it i might be missing here? I'm still very new in iOS development.
class LoaderViewController: UIViewController {
@IBOutlet weak var applicationLoadingIndicator: UIActivityIndicatorView!
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
override func viewDidLoad() {
super.viewDidLoad()
applicationLoadingIndicator.startAnimating()
self.performSegueWithIdentifier("ToMenuViewController", sender: self)
}
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
var vc: ViewController = segue.destinationViewController as ViewController
}
}
Here is the image of the storyboard:
EDIT - SOLUTION:
Solution was to change the performSegueWithIdentifier call into viewDidAppear() method.