Cordova JS OC交互方法
標簽:
JavaScript
CDVPluginResult*pluginResult = [CDVPluginResultresultWithStatus:CDVCommandStatus_OKmessageAsString:@""];
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
这个就是OC回调JS方法
//这边就是JS发起调用OC函数
cordova.exec(this.testSuccess,this.testFail,"TestPluginName","testPluginFunctionWithArgumentsAndCallBack", [{"name":"小明"}, {"age":"9"}, {"frends": ["小白","小溪"]}]);
作者:XLsn0w
链接:https://www.jianshu.com/p/96633eb86cfa
點擊查看更多內容
1人點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦