ãã®æ稿㯠iOS Advent Calendar 2013 - Qiita ã®22æ¥ç®ã®è¨äºã§ãã iOS 7ããæ°ãã追å ãããJavaScriptCore.frameworkã使ã£ã¦JavaScriptã ãã§UIãæ¸ãã¦ã¿ã¾ãããã JavaScriptCore.frameworkã®åºæ¬ (Objective-C -> JavaScript) ã¾ãJavaScriptCore.frameworkã®åºæ¬çãªä½¿ãæ¹ã¯æ¬¡ã®ããã«ãªãã¾ãã JSContext *context = [[JSContext alloc] init]; [context evaluateScript:@"a = 10;"]; JSValue *value = context[@"a"]; NSLog(@"%d", value.toInt32); // => 10 â ã¾ãJavaScriptã®å®è¡ç°å¢ã¨ãã¦JS
{{#tags}}- {{label}}
{{/tags}}