From 5026d424a36752cf831825c3c9b8b354da783449 Mon Sep 17 00:00:00 2001 From: xuyang Date: Sat, 13 Apr 2019 15:39:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=20YYWeakProxy=20=E5=A4=84=E7=90=86=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E8=BD=AC=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YYKit/Utility/YYWeakProxy.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/YYKit/Utility/YYWeakProxy.m b/YYKit/Utility/YYWeakProxy.m index fbf648df..548728da 100644 --- a/YYKit/Utility/YYWeakProxy.m +++ b/YYKit/Utility/YYWeakProxy.m @@ -28,12 +28,11 @@ - (id)forwardingTargetForSelector:(SEL)selector { } - (void)forwardInvocation:(NSInvocation *)invocation { - void *null = NULL; - [invocation setReturnValue:&null]; + [invocation invokeWithTarget:_target]; } - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { - return [NSObject instanceMethodSignatureForSelector:@selector(init)]; + return [_target methodSignatureForSelector:selector]; } - (BOOL)respondsToSelector:(SEL)aSelector {