Ios 奇数旋转效应
我有一个非常标准的iPad应用程序,它被设置为只能是横向的。为了实现这一点,我将初始界面方向设置为横向,将支持界面方向设置为仅单个横向左主按钮,并将shouldAutorotateToInterfaceOrientation属性覆盖为以下内容:Ios 奇数旋转效应,ios,rotation,Ios,Rotation,我有一个非常标准的iPad应用程序,它被设置为只能是横向的。为了实现这一点,我将初始界面方向设置为横向,将支持界面方向设置为仅单个横向左主按钮,并将shouldAutorotateToInterfaceOrientation属性覆盖为以下内容: -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { BOOL b = UIInterfaceOrientat
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
BOOL b = UIInterfaceOrientationIsLandscape(interfaceOrientation);
return b;
}
真正奇怪的是,当应用程序启动时,它是正确的,将iPad上下颠倒没有任何作用,但向下旋转主页按钮会旋转屏幕,但一旦旋转,它将永远不会旋转回来,因此认为这不是旋转设置
以前有人遇到过这种情况吗?来自文档:
#define UIInterfaceOrientationIsLandscape(orientation) \
((orientation) == UIInterfaceOrientationLandscapeLeft || \
(orientation) == UIInterfaceOrientationLandscapeRight)
因此,如果您只想支持其中一个横向旋转,这不是一种方法…您可以在两个横向方向之间旋转它吗?您是否在Info.plist中设置了支持的方向?仅上面的方向,它被设置为仅允许一个方向。Info.plist有一个单一的:ui支持的界面定向~ipad ui界面定向和scapeleft ui界面定向ui界面定向和scapeleft