Tuesday, 15 March 2016

SWIFT: STORY BOARD CONNECT TO STORY BOARD

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()
                }

No comments:

Setting Up Multiple App Targets in Xcode from a Single Codebase

 To create two different apps (like "Light" and "Regular") from the same codebase in Xcode, you can follow these steps b...