RBProtocolMessageInterceptor Class Reference
Inherits from | NSObject |
---|---|
Declared in | RBProtocolMessageInterceptor.h |
Overview
Acts as a middle man enabling the interception of delegate calls.
If middleMan
responds to a selector in the protocol, it will receive the delegate call
instead of the end receiver. It is recommended it then forwards the call to the receiver.
receiver
The end receiver of the delegate calls.
@property (nonatomic, readonly, weak, nullable) id receiver
Declared In
RBProtocolMessageInterceptor.h
middleMan
The middle man that is provided with the opportunity to intercept delegate calls.
@property (nonatomic, readonly, weak, nullable) id middleMan
Declared In
RBProtocolMessageInterceptor.h
protocol
The protocol of the delegate.
@property (nonatomic, readonly, nonnull) Protocol *protocol
Declared In
RBProtocolMessageInterceptor.h
– initWithProtocol:middleMan:receiver:
Initializes a new protocol message interceptor.
- (nonnull instancetype)initWithProtocol:(nonnull Protocol *)protocol middleMan:(nullable id)middleMan receiver:(nullable id)receiver
Parameters
protocol |
The protocol of the delegate to intercept. |
---|---|
middleMan |
The middle man object to implement delegate methods to intercept. |
receiver |
The end receiver of the delegate calls. |
Return Value
The initialized protocol message interceptor, ready to be set as a delegate.
Declared In
RBProtocolMessageInterceptor.h