JavaScript可可桥
2016-08-23
1 0 0
暂无评分
其他
如何获取积分?
This project consists in a lightweight api for iPhone to call Objective-C code from Javascript in a UIWebView. A Javascript code is provided, which is able to communicate to an extension of Cocoa's UIWebview. The JSBridge does not use any private api, and has a dependency on json framework for Objective-C.
Download and add to your XCode project the files JSBridgeWebView.h
, JSBridgeWebView.m
and JSBridge.js
. You will also need to add the JSON framework.
Step-By-Step
After embedding the code in your project, you need to hook up things. Here, I will try to give a quick step-by-step.
- Instanciate a new
JSBridgeWebView
and place it in whatever view you want. - Implement the
JSBridgeWebViewDelegate
, and the method- (void)webView:(UIWebView*) webview didReceiveJSNotificationWithDictionary:(NSDictionary*) dictionary
javascript
可可
相关源码推荐
JavaScript制作十二小时时钟
0
0
暂无评分
751.js
0
0
暂无评分
一种新概念javascript框架
0
0
暂无评分
上托管论坛的脚本博尔达·鲁
0
0
暂无评分
我的个人网站,更新日志
0
0
暂无评分
暂无评论