ios中OC给js传值的方法

时间:2017-07-03 18:00:43   收藏:0   阅读:903

 JSContext *context=[_webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"];

      

       

        NSString*funtionString=[NSString stringWithFormat:@"javascript:showExpressNumber(‘%@‘)",qrString];

         [context evaluateScript:funtionString];//通过oc方法调用js

原文:http://www.cnblogs.com/xiwanxiang190351/p/7112231.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!