未知错误 [UIWindow endDisablingInterfaceAutorotation]

发布于 2024-08-23 13:18:12 字数 315 浏览 18 评论 0原文

我收到此错误。我不知道为什么会这样称呼它,谷歌也没有真正提供帮助。有什么建议吗?

-[UIWindow endDisablingInterfaceAutorotation] called on <UIWindow: 0x4e0ec50; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x4e0f9e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

I am receiving this error. I have no clue as to why it would be called, and Google didn't really help. Any suggestions?

-[UIWindow endDisablingInterfaceAutorotation] called on <UIWindow: 0x4e0ec50; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x4e0f9e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

养猫人 2024-08-30 13:18:12

我最近也遇到了同样的问题。事实证明,我不小心将同一个 UIActionSheet 显示了两次。例如。

[actionSheet showInView:aView];

... more code ...

// WOOPS! I already did this
[actionSheet showInView:aView];

当 UIActionSheet 被忽略时(大约第 12 次,可能是 -beginDisablingInterfaceAutorotation 堆栈深度),它导致了错误。删除对 -showInView: 的冗余调用解决了该问题。

I recently had the same problem. It turned out that I was accidentally displaying the same UIActionSheet twice. eg.

[actionSheet showInView:aView];

... more code ...

// WOOPS! I already did this
[actionSheet showInView:aView];

When the UIActionSheet gets dismissed (for about the 12th time, probably the -beginDisablingInterfaceAutorotation stack depth) it caused the error. Removing the redundant call to -showInView: fixed the problem.

北方的巷 2024-08-30 13:18:12

使用 UIViewControllerAnimatedTransitioning 类执行自定义 UIViewController 演示时,我遇到了类似的问题。对我来说,打印输出如下所示:

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x7f9f83f42db0; frame = (0 0; 375 667); autoresize = W+H; gestureRecognizers = <NSArray: 0x7f9f83f44ed0>; layer = <UIWindowLayer: 0x7f9f83f40ca0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UITextEffectsWindow: 0x7f9f862553a0; frame = (0 0; 375 667); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x7f9f83f9a1e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

我发现错误是由于调用 transitionContext.completeTransition(true) 两次(一次在 animateTransition(_:) 中)引起的,另一个在 CAAnimation 委托 animationDidStop(_:flag:) 方法中)。您可能想检查一下您是否没有做类似的事情。

I've had a similar issue when performing a custom UIViewController presentation using a UIViewControllerAnimatedTransitioning class. For me, the printouts looked like the following:

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x7f9f83f42db0; frame = (0 0; 375 667); autoresize = W+H; gestureRecognizers = <NSArray: 0x7f9f83f44ed0>; layer = <UIWindowLayer: 0x7f9f83f40ca0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UITextEffectsWindow: 0x7f9f862553a0; frame = (0 0; 375 667); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x7f9f83f9a1e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

I found out that the error was caused by calling transitionContext.completeTransition(true) twice (once in animateTransition(_:), and another in a CAAnimation delegate animationDidStop(_:flag:) method). You might want to check that you aren't doing something similar.

初吻给了烟 2024-08-30 13:18:12

将 UIViewAnimationOptionLayoutSubviews 添加到动画选项中解决了我的问题。

Adding UIViewAnimationOptionLayoutSubviews into the animation options solved my problem.

转身泪倾城 2024-08-30 13:18:12

我无缘无故地遇到了类似的问题。我的构建没有任何改变。我所要做的就是从测试设备中删除我的应用程序,重建并重新部署,这个问题就得到了解决。值得一试!

I ran into a similar issue for no reason. Nothing had changed in my build. All I had to do was remove my application from my testing device, rebuild and redeploy and this issue was solved. Worth a shot!

何以畏孤独 2024-08-30 13:18:12

看起来您必须首先调用 -beginDisablingInterfaceAutorotation 但您没有这样做。

Looks like you have to call -beginDisablingInterfaceAutorotation first and you're not doing that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文