简体   繁体   English

iPad旋转锁定问题

[英]iPad Rotation lock problem

Hellow i have a question about the rotation on iPad i have search but i have not found the correct awnser. 您好,我对iPad上的旋转有疑问,但我没有找到正确的遮阳篷。

in the iPad app i can rotate to all interface orientations when i open a special overlay i will lock the interface orientacion to lanscape and as long as the overlay is open the application should not rotate. 在iPad应用程序中,当我打开特殊的覆盖图时,我可以旋转到所有界面方向,我会将界面方向锁定为横向,并且只要打开覆盖图,应用程序就不应旋转。 When i close this overlay the rotation should be enabled. 当我关闭该叠加层时,应启用旋转功能。

i hope someone can help me 我希望有一个人可以帮助我

Yes, you can achieve that. 是的,您可以实现。 I have not tested this code, but I think it will work. 我尚未测试此代码,但我认为它可以工作。

- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation     {
// Return YES for supported orientations.
       if (showing_OVERLAY == YES) {
            return NO;
       }
  return YES;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM