let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
if status == Config.callBackSuccess && wizardUsed == true {
let signinStoryBoard:UIStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let navigationController = signinStoryBoard.instantiateInitialViewController()
self.appDelegate.window?.rootViewController?.dismissViewControllerAnimated(true, completion: nil)
self.appDelegate.window!.rootViewController = navigationController
self.appDelegate.window?.makeKeyAndVisible()
}
else if status == Config.callBackSuccess && wizardUsed == false {
let wizardStoryBoard:UIStoryboard = UIStoryboard(name: "Wizard", bundle: NSBundle.mainBundle())
let navigationController = wizardStoryBoard.instantiateInitialViewController()
self.appDelegate.window?.rootViewController?.dismissViewControllerAnimated(true, completion: nil)
self.appDelegate.window!.rootViewController = navigationController
self.appDelegate.window?.makeKeyAndVisible()
}
if status == Config.callBackSuccess && wizardUsed == true {
let signinStoryBoard:UIStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let navigationController = signinStoryBoard.instantiateInitialViewController()
self.appDelegate.window?.rootViewController?.dismissViewControllerAnimated(true, completion: nil)
self.appDelegate.window!.rootViewController = navigationController
self.appDelegate.window?.makeKeyAndVisible()
}
else if status == Config.callBackSuccess && wizardUsed == false {
let wizardStoryBoard:UIStoryboard = UIStoryboard(name: "Wizard", bundle: NSBundle.mainBundle())
let navigationController = wizardStoryBoard.instantiateInitialViewController()
self.appDelegate.window?.rootViewController?.dismissViewControllerAnimated(true, completion: nil)
self.appDelegate.window!.rootViewController = navigationController
self.appDelegate.window?.makeKeyAndVisible()
}
No comments:
Post a Comment