Objective-C passing around … nil terminated argument lists

后端 未结 3 1810
情书的邮戳
情书的邮戳 2020-11-30 03:18

Having some issues with the ... in ObjectiveC.

I\'m basically wrapping a method and want to accept a nil terminated list and directly pass

3条回答
  •  甜味超标
    2020-11-30 03:46

    How about constructing an NSInvocation object? Since arguments must be passed by pointer, you could pass the pointer to the nil-terminated list.

    You could also iterate over the parameters using marg_list() and construct a nil-terminated list yourself.

    These are just simple suggestions; I haven't tried them out.

提交回复
热议问题