2012-03-21 84 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