मैं कोको/कोको टच के लिए नया हूं, और विकास पुस्तक के माध्यम से काम कर रहा हूं। मैं उन परिस्थितियों में आया हूं जहां @selector() ऑपरेटर का उपयोग किया जाता है। मैं थोड़ा और खो गया हूं कि @selector() ऑपरेटर का उपयोग कैसे किया जाना चाहिए। क्या कोई एक छोटा और मीठा स्पष्टीकरण प्रदान कर सकता है और इसका उपयोग क्यों किया जाता है और डेवलपर को क्या लाभ होता है?कोको @ चयनकर्ता उपयोग का स्पष्टीकरण
वैसे, यहाँ नमूना कोड एप्पल iPhone विकास साइट से लिया @selector()
if ([elementName isEqualToString:@"entry"])
{
parsedEarthquakesCounter++;
// An entry in the RSS feed represents an earthquake, so create an instance of it.
self.currentEarthquakeObject = [[Earthquake alloc] init];
// Add the new Earthquake object to the application's array of earthquakes.
[(id)[[UIApplication sharedApplication] delegate]
performSelectorOnMainThread:@selector(addToEarthquakeList:)
withObject:self.currentEarthquakeObject waitUntilDone:YES];
return;
}
संभव डुप्लिकेट [? कैसे कर एसईएल और iPhone SDK में @selector काम] (http://stackoverflow.com/questions/297680/how-do-:
के बराबर है sel-and-selector-work-in-iphone-sdk) – Monolo