0

比较...

NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:[performer methodSignatureForSelector:@selector(playFile:)]];
[invocation setSelector:@selector(playFile:)];
[invocation setTarget:performer];
NSString* string = [NSString stringWithString:@"reverse.wav"];
[invocation setArgument:&string atIndex:2];

...和...

NSInvocation* invocation = [[NSInvocation prepareWithTarget:performer] playFile:@"reverse.wav"];

. 为什么没有实现这样的方法?

4

1 回答 1

2

事实并非如此,但不乏相同功能的第三方实现,例如为Cocoa with Love编写和创建的实现。

于 2010-10-27T17:20:29.547 回答