开发者

iPhone: Obj C vs JS. Bridge. Send JSON from Obj C to JS

开发者 https://www.devze.com 2023-04-12 17:09 出处:网络
I already asked similar question iPhone: call and send parameters to JS function from OBJ-C. Right now in my JS i have hardcode like:

I already asked similar question iPhone: call and send parameters to JS function from OBJ-C. Right now in my JS i have hardcode like:

> var data = [];
>             data.push({name: '',samsung: 30.5, genNum: 45.7, lastNum: 78.7});
>             data.push({name: 'Jun',samsung: 45.7,nokia: 45.7, genNum: 70.3});
>             data.push({name: 'Jul',samsung: 70.3,nokia: 70.3, genNum: 60.3});
>             data.push({name: 'Aug',samsung: 60.3,nokia: 60.3, genNum: 64.5});
>             data.push({name: 'Sep',samsung: 64.5,nokia: 64.5});
>             data.push({name: 'Nov',samsung: 78.7,andro开发者_高级运维id: 78.7});
>             data.push({name: ' '});

But I want to send this date from Obj C. How to do that ? Thanks...


[mapView stringByEvaluatingJavaScriptFromString:@"javascriptname(arguments)"];

as is, this works for strings

0

精彩评论

暂无评论...
验证码 换一张
取 消