奇怪的 iPad 旋转效果
我有一个非常标准的 iPad 应用程序,它设置为仅横向显示。为了实现这一点,我将初始界面方向设置为横向,并将支持界面方向设置为单个横向左主页按钮,并将 shouldAutorotateToInterfaceOrientation 属性重写为以下内容:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
BOOL b = UIInterfaceOrientationIsLandscape(interfaceOrientation);
return b;
}
真正奇怪的是,当应用程序启动时,它是正确的,并且将 iPad 倒置旋转没有任何作用,但是按下主页按钮旋转会旋转屏幕,但一旦旋转,它就永远不会旋转回来,所以认为这不是旋转设置。
以前有人遇到过这个吗?
I have a pretty standard iPad application that is setup to only be landscape. To affect this, I have set the initial interface orientation to landscape, and the support interface orientations to just the single landscape left home button, and also overridden shouldAutorotateToInterfaceOrientation properties to the following:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
BOOL b = UIInterfaceOrientationIsLandscape(interfaceOrientation);
return b;
}
The really odd thing is that when the app starts out, it is correct, and rotating the iPad upside down does nothing, but rotating with the home button down rotates the screen, but once rotated, it will never rotate back, so thinking this is something other than rotation settings.
Has anyone run into this before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自文档:
因此,如果您只想支持一种景观旋转,这不是可行的方法......
From the docs:
So if you want to support just ONE of the landscape rotations, this is not the way to go...