Hot Licks
Hot Licks

Reputation: 47739

Why is Xcode prompting for this method?

I'm adding some new code to an existing app and started to create the new method --

- (void)removeAnnotationCurtain

As soon as I typed "remove" the Xcode editor prompted me for a bunch of remove methods, including removeAnnotationCurtain:(NSSet*) and removeAnnotationCurtainAtIndexes:(NSIndexSet*). Also in the list were similarly named methods for (apparently) all the other properties defined in the class. (And, no, they're not defined anywhere in the project.)

I'll admit I don't keep up with all the latest stuff, but I've never heard of these methods before. Are they some sort of KVC thing?

(To those who like to jump on the xcode tag, I figure its use is warranted because I'm seeing this symptom while editing in Xcode.)

Upvotes: 0

Views: 55

Answers (1)

Rob Napier
Rob Napier

Reputation: 299505

Yes, this is a KVC thing. These are KVC To-Many methods. I assume you have a property called annotationCurtain? You'll get similar behavior if you start a -(void)insert... or -(void)add....

Xcode doesn't seem to care what the type of the property is, though. It's not quite that smart yet.

Upvotes: 2

Related Questions