Implement a function that retrieves the storyboard when specifying a name.
func getStoryBoard(name : String)-> UIStoryboard { var storyBoard = UIStoryboard(name: name, bundle: nil); return storyBoard; }
Change the delegation method of the application, for example:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { var storyBoard = getStoryBoard("Main") // Change the storyboard name based on the device, you may need to write a condition here for that var initialViewController: UIViewController = storyBoard.instantiateInitialViewController() as! UIViewController self.window?.rootViewController = initialViewController self.window?.makeKeyAndVisible() // Override point for customization after application launch. return true }
source share