小编Chr*_*ett的帖子

从NSInvocation获取参数值

有人可以解释一下如何将值传递给使用时被拦截的不存在的方法:

+ (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)

我可以毫无问题地获得方法签名,但我对如何获取传入的值非常困惑.

当我应该使用这些方法或者只是遗漏某些东西时,我完全偏离了基础吗?

cocoa objective-c

13
推荐指数
1
解决办法
4309
查看次数

标签 统计

cocoa ×1

objective-c ×1