2013-07-13 51 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) 
    } 
} 
相關問題