-(void) Setgradientcolor: (Uicolor *) Begincolor Transitioncolor: (Uicolor *) Transitioncolor,... Ns_requires_nil_termination;
Ns_requires_nil_termination, for compile-time non- NIL End Checks
-(void) Setgradientcolor: (Uicolor *) Begincolor Transitioncolor: (Uicolor *) Transitioncolor, ... {
[Self.gradientcolors AddObject: (ID) begincolor.cgcolor];
// Define a pointer to an optional parameter list
Va_list args;
// Gets the address of the first optional parameter, at which point the argument list pointer points to the first optional parameter in the function argument list
Va_start (args, transitioncolor);
if (Transitioncolor)
{
[Self.gradientcolors AddObject: (ID) transitioncolor.cgcolor];
// iterate through the parameters in the parameter list and point the argument list pointer to the next parameter in the argument list
Uicolor *nextarg;
while ((Nextarg = Va_arg (args, Uicolor *)))
{
[Self.gradientcolors AddObject: (ID) nextarg.cgcolor];
}
}
// end get of variable parameter ( empty parameter list )
Va_end (args);
}
[Drawcircleview setgradientcolor:[uicolor Purplecolor] transitioncolor:[uicolor redcolor],[uicolor BlueColor], nil];
IOS Multiple Unknown parameters