2011-08-26 90 views
0

我已经在LandscapeLeft模式下创建了一个iPad应用程序,并且我已经根据LandscapeLeft模式设置了我的UI。但是,当我运行我的应用程序时,它以纵向模式显示UI。我无法弄清楚这个问题。iPad中LandscapeLeft模式下的UI问题

请回复.....

在此先感谢.....

+0

你好Aarti !!!我也是iphone的新手。我可以有你的Skype ID或电子邮件,这样我们可以直接询问Que并迅速得到答案。 :P – mAc

+0

你可以添加我的Skype名称: - mAc.0701 – mAc

回答

0

写在你的应用程序委托文件,下面的代码。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 

    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) 
} 
+0

hiii,thnx for ur reply ....但是当我从mainWindow.xib文件中移除NavigationController插口....显示完美UI的应用程序,但是当再次我设置它出现的插座PortraitMode UI ... – Aarti

+0

然后你必须复制 - 粘贴上面的代码在你的所有UIViewController。或者你可以编辑你的info.plist文件。 “支持的界面方向”在此字段中有四个方向删除两个纵向方向。 –

1

任何应用程序始终在只有横向模式肖像mode.To推出推出去Info.plist文件并更改支持方位阵列相应

或者

在您浏览器的shouldAutorotate方法添加以下代码

if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) { 
    return YES; 
} 

return NO;