Selector Literal 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 expecta a
var s: SEL := selector(compare:options:);
Using the selector literal syntax will cause the compiler to perform checks if 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 safely over using the
selector keyword is relevant and available on the Cocoa platform only.