UIViewController
使用类执行自定义演示时,我遇到了类似的问题UIViewControllerAnimatedTransitioning
。对我来说,打印输出如下所示:
-[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:)
方法中)。你可能想检查你没有做类似的事情。