gpt4 book ai didi

objective-c - 为什么prepareWithInitationTarget是: specific to NSUndoManager?

转载 作者:行者123 更新时间:2023-12-03 17:44:20 24 4
gpt4 key购买 nike

比较...

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"];

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

最佳答案

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

关于objective-c - 为什么prepareWithInitationTarget是: specific to NSUndoManager?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4035836/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com