Skip to content

Instantly share code, notes, and snippets.

@ento
Created July 22, 2009 07:22
Show Gist options
  • Save ento/151861 to your computer and use it in GitHub Desktop.
Save ento/151861 to your computer and use it in GitHub Desktop.
How to access a variadic argument in Objective-C
- (void)variadic:(NSString*)strings, ... {
va_list lst;
NSString* each;
va_start(lst, strings);
while (each = va_arg(lst, NSString*)) {
[NSString stringWithString: each];
}
va_end(lst);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment