You should do this by simply adding this code to your application delegate.
Quick code:
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> Int { if UIDevice.currentDevice().userInterfaceIdiom == .Phone { return Int(UIInterfaceOrientationMask.Portrait.rawValue) } else { return Int(UIInterfaceOrientationMask.LandscapeLeft.rawValue | UIInterfaceOrientationMask.LandscapeRight.rawValue) } }
Travis M.
source share