Why are warnings generated when calling methods undeclared in a class interface using conventional means, but not when calling methods using @selector? Is it because selectors can be executed by a different caller than self?
For example:
-(void) doStuff
{
[self doNow]; // Warning: instance method not found
SEL sel = @selector(doNow); // no warnings
}
-(void) doNow {} // this method is not declared in the interface
The “Undeclared Selector” warning is turned off by default. I don’t know why. You can turn it back on in the Build Settings.
The documentation for this settings reads: