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
targetandselectorare 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.
-
targetThe target of the listener, if available (otherwise, nil).
property -
selectorThe 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)blockDiscussion
Indicates if this event fits either the combination of target and selector, or a block.
Declared In
SPEventListener.hinitWithBlock:
Initializes an event listener from a block.
- (instancetype)initWithBlock:(SPEventBlock)blockDiscussion
Initializes an event listener from a block.
Declared In
SPEventListener.hinitWithTarget:selector:
Initializes an event listener from a target and a selector.
- (instancetype)initWithTarget:(id)target selector:(SEL)selectorDiscussion
Initializes an event listener from a target and a selector.
Declared In
SPEventListener.hinitWithTarget: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)blockDiscussion
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