How can I get the parameter names to show up when making a method in objective-c?
For example, I notice that NSDictionary defines it’s method like this:
- (void)setValue:(id)valueforKey:(NSString *)key;
But it actually shows up in use as this:
[dictionary setValue:@"myValue" forKey:@"myKey"];
If I define the same stub above in my header file, it shows up as this in use:
[self setValue:@"My value" :@"My Key"]
You are missing a space:
The signature that you provided uses identifier
valueforKeyas the name of the first formal parameter, and an empty segment for thekeyparameter.