有人可以解释一下如何将值传递给使用时被拦截的不存在的方法:
+ (void)forwardInvocation:(NSInvocation *)anInvocation;
+ (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector;
Run Code Online (Sandbox Code Playgroud)
给出如下消息:
[SomeClass doSomething:@"theThing" withSomething:@"aParam"];
Run Code Online (Sandbox Code Playgroud)
我可以毫无问题地获得方法签名,但我对如何获取传入的值非常困惑.
当我应该使用这些方法或者只是遗漏某些东西时,我完全偏离了基础吗?