Git address: Http://git.oschina.net/feiji1hao/NZOCJSBridge
Project is a middleware that provides objective-c and JavaScript communication for hybrid development
Simply copy the catalog Nzocjsbridge to your project and bring your demo with you, and familiarize yourself with the examples before use.
For easy reading and use, only two main APIs are available and need to be self-expandable
First, OC sends a message to JS and callbacks
[_bridge send:@ "OC send String to JS" responsecallback:^ (ID response) {NSLog (@ "OC got response:%@", response); }];
Second, JS send a message to OC and callback
Bridge.send (' JS send String to OC ', function (responsedata) {console.log (' JS got response ', ResponseData)})
Note: Only the item is Webviewjavascriptbridge's thumbnail version
Middleware for objective-c and JavaScript to communicate with each other