Skip to content

Instantly share code, notes, and snippets.

@CocoaBeans
Created July 24, 2013 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CocoaBeans/6074002 to your computer and use it in GitHub Desktop.
Save CocoaBeans/6074002 to your computer and use it in GitHub Desktop.
Quickie for -[NSString stringWithFormat:...] just throw the following in a header.... #define $(...) ((NSString *)[NSString stringWithFormat:__VA_ARGS__,nil]) and then use like [$(@"whatever%ld %@", 2, obj ) stringByRemoving......]
#define $(...) ((NSString *)[NSString stringWithFormat:__VA_ARGS__,nil])
// use like so...[$(@"whatever%ld %@", 2, obj ) stringByRemoving......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment