Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created December 23, 2011 13:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/1514233 to your computer and use it in GitHub Desktop.
Save mikeabdullah/1514233 to your computer and use it in GitHub Desktop.
A convenience for NSAlert construction
@implementation NSAlert (Karelia)
- (void)ks_setMessageTextWithFormat:(NSString *)format, ...;
{
va_list argList;
va_start(argList, format);
NSString *formatted = [[NSString alloc] initWithFormat:format arguments:argList];
va_end(argList);
[self setMessageText:formatted];
[formatted release];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment