Alright so let me just give you an overview of my system. I have a intial root view (home) that contains two buttons (sign up - login) where each of these buttons has its own viewcontroller. The LoginViewController has a method as such:
if ((user) != nil) {
let alert = UIAlertView(title: "Success", message: "Logged In", delegate: self, cancelButtonTitle: "OK")
alert.show()
dispatch_async(dispatch_get_main_queue(), { () -> Void in
let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("View")
self.presentViewController(viewController, animated: true, completion: nil)
})
} else {
let alert = UIAlertView(title: "Error", message: "Hmm, that doesn't seem right. Try again.", delegate: self, cancelButtonTitle: "OK")
alert.show()
}
Where if login is successful it takes you to the ViewController w/ identifier "Main". Thing is that im having trouble setting the initial controller to the "home" view when using your approach, and i think this is due to the code you provided for the appDelegate. Even though I set the Home viewcontroller to initial, it still takes me to the middleviewcontroller. what am i doing wrong?