Skip to main content

sel

Macro sel 

Source
macro_rules! sel {
    ($name:ident) => { ... };
    ($($name:ident :)+) => { ... };
}
Expand description

Cached selector lookup.

This macro creates a lazily-initialized static selector that is registered with the Objective-C runtime on first use.

§Examples

// Simple selector
let s = sel!(init);

// Selector with colons (method with parameters)
let s = sel!(initWithFrame:);

// Multiple parameter selector
let s = sel!(newBufferWithLength:options:);