Skip to content

Instantly share code, notes, and snippets.

@arthurdarcet
Created September 27, 2013 13:23
Show Gist options
  • Save arthurdarcet/6728522 to your computer and use it in GitHub Desktop.
Save arthurdarcet/6728522 to your computer and use it in GitHub Desktop.
Variadic function in Objective-C
- (void)fun:(NSString *)first, ...
{
va_list args;
va_start(args, first);
for (NSString* arg = first; arg != nil; arg = va_arg(args, NSString*))
NSLog(@"var: %@", arg);
va_end(args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment