Skip to content

Instantly share code, notes, and snippets.

@johnmckerrell
Created July 15, 2013 11:22
Show Gist options
  • Save johnmckerrell/5999255 to your computer and use it in GitHub Desktop.
Save johnmckerrell/5999255 to your computer and use it in GitHub Desktop.
Example of some Objective C I'd like to write
NSDictionary *params = @{
@"vals" : @{
@"flip" : @"1",
@"mirror" : @"0"
}
};
NSString *flipCommand = @"command.cgi?flip={self.vals.flip}&mirror={self.vals.mirror}"
[flipCommand stringByMagicallyApplyingKeyPathsToADictionary:params];
NSLog(@"flipCommand=%@", flipCommand);
// Should output: flipCommand=command.cgi?flip=1&mirror=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment