我不知道为什么设备方向不起作用。设备方向
在项目属性:
在我的代码有:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation ==UIInterfaceOrientationLandscapeRight));
}
我探讨它在我的iPhone,并不会改变。
有什么缺失?
预先感谢您
编辑(info.plist中)
支持的界面方向添加info.plist – Rajneesh071
您的设备上是否启用了方向锁? –
不,它没有被锁定,我也尝试过在xcode中使用iphone模拟器 – user1256477