2013-07-13 53 views

回答

0

因此,这里是我做过什么

对于iPhone enter image description here

,并为iPad enter image description here

而对于iPad的控制器,我添加下面的代码,这是没有必要的应用

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || 
      interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
} 
0

你应该可以做只需将此代码添加到您的应用程序代理。

斯威夫特代码:

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) 
    } 
} 
相关问题