SFMethodInterceptor Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | SFMethodInterceptor.h |
Overview
This class provides a simple way to intercept an instance method or a class method and forward message to the original method if needed.
classToIntercept
Class to intercept
@property (nonatomic, strong) Class classToInterceptDeclared In
SFMethodInterceptor.h
selectorToIntercept
Selector to intercept
@property (nonatomic) SEL selectorToInterceptDeclared In
SFMethodInterceptor.h
instanceMethod
YES if the selectorToIntercept is an instance
method, NO if it’s a class method.
@property (nonatomic) BOOL instanceMethodDeclared In
SFMethodInterceptor.h
targetBeforeBlock
Block to be called before the target method. Can be nil.
@property (nonatomic, copy) SFMethodInterceptorInvocationCallback targetBeforeBlockDeclared In
SFMethodInterceptor.h
targetReplaceBlock
Block that replaces the target method. Can be nil.
@property (nonatomic, copy) SFMethodInterceptorInvocationCallback targetReplaceBlockDeclared In
SFMethodInterceptor.h
targetAfterBlock
Block to be called after the target method. Can be nil.
@property (nonatomic, copy) SFMethodInterceptorInvocationAfterCallback targetAfterBlockDeclared In
SFMethodInterceptor.h
enabled
Set this property to YES to enable the interceptor.
@property (nonatomic) BOOL enabledDeclared In
SFMethodInterceptor.h