美文网首页
oc 调用js函数

oc 调用js函数

作者: ShawnDu | 来源:发表于2016-06-06 22:38 被阅读85次
        id userinfo = notify.userInfo;
        NSInteger code = [userinfo[@"code"] integerValue];
        NSString *platform = userinfo[@"platform"];
        NSString *url = userinfo[@"url"];
        NSString *js = [NSString stringWithFormat:@"onShared(\"%d\",\"%@\",\"%@\");", (int)code, platform, url];
        [self.webView stringByEvaluatingJavaScriptFromString:js];

相关文章

网友评论

      本文标题:oc 调用js函数

      本文链接:https://www.haomeiwen.com/subject/kprddttx.html