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:)
विधि में एक और)। आप यह जांचना चाहेंगे कि आप कुछ ऐसा नहीं कर रहे हैं।
मैंने इस विधि को शुरू करने के लिए कॉल नहीं किया है, मैंने पहले से ही पढ़ा है कि startMethod को पहले कॉल करने की आवश्यकता है, लेकिन यह तब होता है जब आप अंत को कॉल करते हैं और मैंने नहीं किया, हालांकि मैंने कोड के टुकड़े को ट्रैक किया जिसके कारण यह हुआ, [स्वयं शो खरीद: एनिमेटेड खरीद: हाँ]; एनिमेटेड जरूरतों को NO पर सेट करने की आवश्यकता है। बात यह है कि, जब मैंने पहली बार यह लिखा था, तब तक मैंने कोई त्रुटि नहीं फेंक दी, जब तक कि मैंने तालिका में कुछ कोड नहीं बदला, दृश्यों को देखने के लिए, मुझे केवल एक सेक्शन के पहले, कई अनुभागों के कारण स्विच स्टेटमेंट का उपयोग करने की आवश्यकता थी, मैं अभी भी जांच कर रहा हूं। – iAm