Created
April 6, 2010 11:27
-
-
Save sarnesjo/357492 to your computer and use it in GitHub Desktop.
convenience macros for creating NSArray and NSDictionary instances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define A(...) [NSArray arrayWithObjects:__VA_ARGS__, nil] | |
#define D(...) [NSDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, nil] | |
NSArray *a = A(@"foo", @"bar"); | |
NSDictionary *d = D(@"1", @"foo", @"2", @"bar"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment