Inherits from NSObject
Declared in SPEventListener.h

Overview

This class captures information about an event listener, which can be either a block or a combination of a target object and a selector.

This is an internal class. You do not have to use it manually.

Tasks

Properties

selector

The selector of the listener, if available (otherwise, nil).

@property (nonatomic, readonly) SEL selector

Discussion

The selector of the listener, if available (otherwise, nil).

Declared In

SPEventListener.h

target

The target of the listener, if available (otherwise, nil).

@property (nonatomic, readonly) id target

Discussion

The target of the listener, if available (otherwise, nil).

Declared In

SPEventListener.h

Instance Methods

fitsTarget:andSelector:orBlock:

Indicates if this event fits either the combination of target and selector, or a block.

- (BOOL)fitsTarget:(id)target andSelector:(SEL)selector orBlock:(SPEventBlock)block

Discussion

Indicates if this event fits either the combination of target and selector, or a block.

Declared In

SPEventListener.h

initWithBlock:

Initializes an event listener from a block.

- (instancetype)initWithBlock:(SPEventBlock)block

Discussion

Initializes an event listener from a block.

Declared In

SPEventListener.h

initWithTarget:selector:

Initializes an event listener from a target and a selector.

- (instancetype)initWithTarget:(id)target selector:(SEL)selector

Discussion

Initializes an event listener from a target and a selector.

Declared In

SPEventListener.h

initWithTarget:selector:block:

Initializes an event listener with the specified properties. Note that target and selector are only used by the fitsTarget: method; it’s always the block that will be invoked. Designated Initializer.

- (instancetype)initWithTarget:(id)target selector:(SEL)selector block:(SPEventBlock)block

Discussion

Initializes an event listener with the specified properties. Note that target and selector are only used by the fitsTarget: method; it’s always the block that will be invoked. Designated Initializer.

Declared In

SPEventListener.h

invokeWithEvent:

Invokes the event block with a certain event.

- (void)invokeWithEvent:(SPEvent *)event

Discussion

Invokes the event block with a certain event.

Declared In

SPEventListener.h