swift - iOS 8 Storyboard / Main Interface -
I am an iOS made 8 App for I have two storyboard for the iPhone and iPad I IPad.storyboard main interface My problem is set that every time I run on an iPhone device, the iPad. Storeboard is still being called.
Is there a way to automatically detect the storyboard for a fixed device?
// if a quicker solution you are looking for (UIDevice.currentDevice () UserInterfaceIdiom == UIUserInterfaceIdiom.Pad) {// iPad Y iPadBoyer: UITorryboard! iPadBoard = UIStoryboard (name: "iPad", bundle: nil) ViewController to: UIViewController = iPadBoard.instantiateViewControllerWithIdentifier ( "iPad") UIViewController self.window as .rootViewController = ViewController} else {// iPhone bridesmaid iPhoneBoard: UIStoryboard! iPhoneBoard = UIStoryboard (name: "iPhone", bundle: nil) ViewController to: UIViewController = iPhoneBoard.instantiateViewControllerWithIdentifier ( "iPhone5") UIViewController self.window as .rootViewController = ViewController} < / Html>
Comments
Post a Comment