iPhone景观问题 [英] iPhone landscape issues
本文介绍了iPhone景观问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
xcode:4.5.2
xcode:4.5.2
我想在iPad上创建一个应用程序;
I want to create an application in iPad;
我设置了我的info.plist如下:
I settings my info.plist as below:
初始界面方向:横向(左主页按钮)
Initial interface orientation: Landscape (left home button)
当我开始我的时候应用程序,定位设备有横向模式,但我的视图不会旋转到此定向。
When I started my app, the orientation device have landscape mode, but my view not rotate to this orienatation.
我不知道它是什么,谁可以帮助我
I don't know what it is, who can help me
推荐答案
在 ios6 中,您必须将此方法用于 vieworientation
In ios6 you have to use this method for vieworientation
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationMaskAll;
}
这篇关于iPhone景观问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文