मैं या तो मस्तिष्क क्षतिग्रस्त या मैं NSNotificationCenterNSNotification removeObserver समस्या
के कुछ understending समस्या यह है कि है की कमी हूं कि अगर मैं एक पर्यवेक्षक बना सकते हैं और अगली पंक्ति में ऐसा है जैसे कि यह हटाने का प्रयास करेंगे:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllVisibleMapViews) name:@"ClearVisibleMaps" object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"ClearVisibleMaps"];
मैं
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer <MyApp 0x592db70> for the key path "ClearVisibleMaps" from <NSNotificationCenter 0x4e0fbb0> because it is not registered as an observer.'
मिल रहा जोड़ सकते हैं और पर्यवेक्षक लाइन लाइन के बाद सिर्फ एक बिंदु बनाने के लिए हटा दें। मेरे कोड में मैं dealloc में हटाने का उपयोग करूँगा।
तो कोई विचार यह क्यों कहता है कि मैंने पहली जगह में जोड़ा और पर्यवेक्षक नहीं जोड़ा?
धन्यवाद तो यह सच मैं मस्तिष्क हूँ क्षतिग्रस्त :-) hehe कम से कम आज है: हटाने कुछ इस तरह होना चाहिए। – Cyprian