Selector Expressions (Cocoa)
__selector keyword can be used to get a selector reference on Cocoa, for example to dynamically invoke methods, or pass them to Cocoa APIs that expect a
SEL s = __selector(compare:options:);
Using the selector literal syntax will cause the compiler to check whether the specified selector is valid and known, and a warning will be emitted if a selector name is provided that does not match any method known to the compiler. This provides extra safety over using the
__selector keyword is relevant and available on the Cocoa platform only.