Skip to content

Instantly share code, notes, and snippets.

@crayment
Created August 11, 2010 06:02
Show Gist options
  • Save crayment/518556 to your computer and use it in GitHub Desktop.
Save crayment/518556 to your computer and use it in GitHub Desktop.
NSDictionary *dictionary;
NSArray *words = [dictionary allKeys];
NSMutableString *javascript = @"addText(";
for (int i=0; i<[words count]; i++) {
[javascript appendString:@"%@", [words objectAtIndex:i]];
if(i<([words count]-1)) {
[javascript appendString:@", "];
}
}
[javascript appendString:@");"];
[webView stringByEvaluatingJavaScriptFromString:javascript];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment