ISInvocationHookProxy 挂钩目标的每个NSInvocation的代理对象
ISInvocationHookProxy挂钩目标的每个NSInvocation的代理对象。
用法:
NSString *object = [[NSString alloc] init];
ISInvocationHookProxy *proxy = [[ISInvocationHookProxy alloc] initWithTarget:object];
proxy.hookBlock = ^(NSInvocation *invocation) {
// will be called when [(NSString *)proxy length]; is executed
};
[(NSString *)proxy length];
覆盖调用的返回值:
NSString *object = @\"foo\";
ISInvocationHookProxy
用户评论