2013-02-25 19 views
6

मैं इन दो कार्यों का उपयोग कर रहा हूं [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; और [[UIApplication sharedApplication] endIgnoringInteractionEvents]; जबकि मैं सर्वर से डेटा डाउनलोड कर रहा हूं।endIgnoringInteractionEvents जोड़ने से पहले startIgnoringInteractionEvents से कैसे मिलान करें

मुझे अपने लॉग में त्रुटि से नीचे आ रहा है।

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring. 

मैंने कुछ लिंक खोजने की कोशिश की लेकिन इसके लिए उचित समाधान नहीं मिला।

How do you disable touch to screen without using beginIgnoringInteractionEvents?

What is “-[UIApplication beginIgnoringInteractionEvents] overflow. Ignoring.”?

Ignoring UI Events in AppKit

beginIgnoringInteractionEvents or userInteractionEnabled = NO not working as expected

+0

यह भी एक त्रुटि नहीं है। '- [UIAplplication endIgnoringInteractionEvents] मिलान के बिना बुलाया जाता है-beginIgnoringInteractionEvents। अनदेखा। '' अनदेखा 'देखें? (Haha)। UIKit इसके बारे में परवाह नहीं करता है। –

उत्तर

11

आपको हमेशा यह सुनिश्चित कर सकते हैं।

if ([[UIApplication sharedApplication] isIgnoringInteractionEvents])... 
+2

धन्यवाद .... :) –

+1

@Rok: isIgnoringInteractionEvents सत्य लौट रहा है भले ही मैंने startIgnoringInteractionEvents नहीं कहा है। चेतावनी दृश्य बंद होने के बाद ऐसा होता है। कोई विचार क्या हो रहा है? –

+0

हम्म, इस मुद्दे का सामना कभी नहीं किया था। तो आपको अनदेखा करना गलत लगता है ... और सत्य बंद होने के बाद बंद है? क्या वो सही है? क्या आपके पास इस चेतावनी (आपके कोड का हिस्सा) पर पूर्ण नियंत्रण है या क्या यह तृतीय पक्ष कोड का हिस्सा है? –