Skip to content

Instantly share code, notes, and snippets.

@jodell
Created June 1, 2012 15:27
Show Gist options
  • Save jodell/2852956 to your computer and use it in GitHub Desktop.
Save jodell/2852956 to your computer and use it in GitHub Desktop.
class reference dictionary
NSString * const MYFoo = @"foo";
NSString * const MYBar = @"bar";
@implementation Baz
+ (NSDictionary *)metaSyntacticTypes {
static NSDictionary *_metaSyntacticTypes = nil;
if (_metaSyntacticTypes == nil) {
_metaSyntacticTypes = [NSDictionary dictionaryWithObjectsAndKeys:
@"foo", MYFoo,
@"bar", MYBar,
nil];
}
return _metaSyntacticTypes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment