Skip to content

Instantly share code, notes, and snippets.

@jwhitehorn
Created February 12, 2014 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhitehorn/8964813 to your computer and use it in GitHub Desktop.
Save jwhitehorn/8964813 to your computer and use it in GitHub Desktop.
- (void)render:(NSDictionary *)jsViewObject
{
for (NSString *key in jsViewObject)
{
id value = [jsViewObject objectForKey:key];
if ([key isEqualToString:@"inCurrencies"]) {
[self renderCurrencyPicker:inCurrencyPicker usingData:value to:_inCurrencyData];
} else if ([key isEqualToString:@"outCurrencies"]) {
[self renderCurrencyPicker:outCurrencyPicker usingData:value to:_outCurrencyData];
} else if ([key isEqualToString:@"in_amount"]) {
[outAmount setText:[NSString stringWithFormat:@"%@", [jsViewObject objectForKey:@"in_amount"]]];
} else if ([key isEqualToString:@"out_amount"]) {
[outAmount setText:[NSString stringWithFormat:@"%@", [jsViewObject objectForKey:@"out_amount"]]];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment