rickytan/RTBlockCallChecker

不需要依赖私有方法- (void)invokeUsingIMP:(IMP)imp;

Closed this issue · 1 comments

消息转发内部直接调用- (void)invokeWithTarget:(id)target,将target换成原block即可

- (void)forwardInvocation:(NSInvocation *)anInvocation
{
    RTBlock *layout = (__bridge RTBlock *)self;
    layout->reserved = 1;
    
    [anInvocation invokeWithTarget:(__bridge id)layout->forwardingBlock];
}

因block方法签名中没有selector,故selector或imp不是必要参数

确实可以,感谢反馈!