2012-03-21 85 views
0

如何使用xcode 3.2.6在橫向模式下創建通用應用程序默認情況下?我需要爲每個視圖分離.xib文件,我是否必須使用此代碼 - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {//對於支持的方向返回YES return(interfaceOrientation == UIInterfaceOrientationLandscape); }universal xcode 3.2.6默認的橫向模式

回答

0

我使用此示例代碼,並使其基於視圖我只隱藏其導航b AR由RootViewController_Phone.h和RootViewController_Pad BenellingsonPost

0

在你的plist,你應該改變supported interface orientations只是兩個項目:

項目0 Landscape (right home button)

項目1 Landscape (left home button)

而且在每個視圖控制器使用:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    return (UIInterfaceOrientationIsLandscape(interfaceOrientation)); 
} 
+1

@iphonemaclover,大使用此代碼 self.navigationController.navigationBarHidden = YES; ! – iNoob 2012-03-22 03:10:43