Skip to content

Instantly share code, notes, and snippets.

@soharu
Last active December 14, 2015 13:58
Show Gist options
  • Save soharu/5096919 to your computer and use it in GitHub Desktop.
Save soharu/5096919 to your computer and use it in GitHub Desktop.
va_list in Cocoa
- (void)setContentsWithFormat:(NSString *)formatString, ...
{
[contents autorelease];
va_list args;
va_start(args, formatString);
contents = [[NSString alloc] initWithFormat:formatString arguments:args];
va_end(args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment