iPhone:Obj C vs JS。桥。从Obj C发送JSON到JS

时间:2011-10-11 07:46:34

标签: javascript iphone objective-c sencha-touch

我已经问了类似的问题iPhone: call and send parameters to JS function from OBJ-C。 现在我的JS中有硬编码:

> 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,android: 78.7});
>             data.push({name: ' '});

但是我想从Obj C发送这个日期。怎么做?感谢...

1 个答案:

答案 0 :(得分:0)

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

原样,这适用于字符串