Created
August 12, 2009 01:45
-
-
Save Machx/166253 to your computer and use it in GitHub Desktop.
This file contains 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 NSDICT(...) [NSDictionary dictionaryWithObjectsAndKeys: __VA_ARGS__, nil] | |
#define NSARRAY(...) [NSArray arrayWithObjects: __VA_ARGS__, nil] | |
#define NSBOOL(_X_) [NSNumber numberWithBool:(_X_)] | |
//example usage | |
NSArray *items = NSARRAY(NSDICT(@"Hello World!", @"title", | |
[NSImage imageNamed:@"worldHello"], @"icon", | |
NSBOOL(YES), @"isAwesome"), | |
NSDICT(@"Good Bye, World!", @"title", | |
[NSImage imageNamed:@"winkyfrownyface"], @"icon", | |
NSBOOL(NO), @"isAwesome")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment