Skip to content

Instantly share code, notes, and snippets.

@ccarse ccarse/gist:3230017
Created Aug 1, 2012

Embed
What would you like to do?
Obj-C new literal types example.
// Before
NSMutableDictionary *mainDict = [[NSMutableDictionary alloc] init];
[mainDict setObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithBool:false], serverBlob, nil]
forKeys:[NSArray arrayWithObjects:@"moreChangesAvailable", @"serverBlob", nil]], changes, nil]
forKeys:[NSArray arrayWithObjects:@"__sync", @"results", nil]]
forKey:@"d"];
// After
NSDictionary *mainDict = @{@"d":@{@"__sync":@{@"moreChangesAvailable":@0, @"serverBlob":serverBlob}, @"results":changes}};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.