It does not have to be true. There are two hidden arguments for each Objective-C method, self and _cmd (in that order). self is self-evident (ha ha), but less known is _cmd , which is just the selector that was used to call the current method. This allows you to use variable arguments with Objective-C methods, it would seem, without using an initial argument, as you do with the standard variational function C.
- (void) someMethod:... { va_list va; va_start(va, _cmd);
Then you can call the method as follows:
[someObj someMethod:1, 2, 3]
source share