在Objective C中发送/转发变量参数

时间:2012-06-07 04:30:17

标签: objective-c variables ios5 variable-assignment

我知道这在其他编程语言中是可行的。假设我们有以下安排:

- (void) myMethod:(NSString*)variables, ... {
    // Handle business here.
}

- (void) anotherMethod:(NSString*)variables, ... {
    // We want to pass these variable arguments for handling
    [self myMethod:variables, ...]; // Do not pass GO
}

// Start the party:
[self anotherMethod:@"arg1", @"arg2", @"arg3", @"arg4", nil];

让这个在ObjC中工作的诀窍是什么?

1 个答案:

答案 0 :(得分:0)

是。在objective-c中是可能的。你可以在here上找到好的写作。

相关问题