I'm trying to call another view controller in a method of my first view controller. The view controller I'm trying to call contains a container that embeds a page view controller. Is has the storyboard ID "containerID".
I try it that way:
class loadingViewController : UIViewController {
override func viewDidLoad() {
var vc = self.storyboard?.instantiateViewControllerWithIdentifier("containerID") as ViewController
self.presentViewController(vc, animated: true, completion: nil)
}
}
And I get the error, :"whose view is not in the window hierarchy"
But I don't understand why. Could please someone help me out?