multiple argument list with NS_REQUIRES_NIL_TERMINATION

arguments, list, objective-c, variadic-functions, xcode

Solution

Simply put: No. It is not possible.

There is, however, a workaround available; you can pass instead two pointers to `id` that work out to nil-terminated arrays, like so:

- (id)method:(id *)part_one withTwo:(id *)part_two

Edit: As an alternative, the list could be `nil`-terminated twice. (Now that is weird!)

Problem

I have a function -(id) func: params1, ... NS_REQUIRES_NIL_TERMINATION and2: params2, ... NS_REQUIRES_NIL_TERMINATION; Compiler says: error: expected `;' before 'and2' Is there any way to make function with 2 argument lists?

Original source