SPEventListener Class Reference
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
-
– initWithTarget:selector:block:
Initializes an event listener with the specified properties. Note that
target
andselector
are only used by thefitsTarget:
method; it’s always the block that will be invoked. Designated Initializer. -
– initWithTarget:selector:
Initializes an event listener from a target and a selector.
-
– initWithBlock:
Initializes an event listener from a block.
-
– invokeWithEvent:
Invokes the event block with a certain event.
-
– fitsTarget:andSelector:orBlock:
Indicates if this event fits either the combination of target and selector, or a block.
-
target
The target of the listener, if available (otherwise, nil).
property -
selector
The selector of the listener, if available (otherwise, nil).
property
Properties
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