未知错误 [UIWindow endDisablingInterfaceAutorotation]
我收到此错误。我不知道为什么会这样称呼它,谷歌也没有真正提供帮助。有什么建议吗?
-[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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我最近也遇到了同样的问题。事实证明,我不小心将同一个 UIActionSheet 显示了两次。例如。
当 UIActionSheet 被忽略时(大约第 12 次,可能是 -beginDisablingInterfaceAutorotation 堆栈深度),它导致了错误。删除对 -showInView: 的冗余调用解决了该问题。
I recently had the same problem. It turned out that I was accidentally displaying the same UIActionSheet twice. eg.
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.
使用
UIViewControllerAnimatedTransitioning
类执行自定义UIViewController
演示时,我遇到了类似的问题。对我来说,打印输出如下所示:我发现错误是由于调用
transitionContext.completeTransition(true)
两次(一次在animateTransition(_:)
中)引起的,另一个在CAAnimation
委托animationDidStop(_:flag:)
方法中)。您可能想检查一下您是否没有做类似的事情。I've had a similar issue when performing a custom
UIViewController
presentation using aUIViewControllerAnimatedTransitioning
class. For me, the printouts looked like the following:I found out that the error was caused by calling
transitionContext.completeTransition(true)
twice (once inanimateTransition(_:)
, and another in aCAAnimation
delegateanimationDidStop(_:flag:)
method). You might want to check that you aren't doing something similar.将 UIViewAnimationOptionLayoutSubviews 添加到动画选项中解决了我的问题。
Adding UIViewAnimationOptionLayoutSubviews into the animation options solved my problem.
我无缘无故地遇到了类似的问题。我的构建没有任何改变。我所要做的就是从测试设备中删除我的应用程序,重建并重新部署,这个问题就得到了解决。值得一试!
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!
看起来您必须首先调用
-beginDisablingInterfaceAutorotation
但您没有这样做。Looks like you have to call
-beginDisablingInterfaceAutorotation
first and you're not doing that.