Last active
August 29, 2015 14:18
-
-
Save daviesgeek/42d3205aa6b76ec0c27f to your computer and use it in GitHub Desktop.
WebViewJavascriptBridge callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bridge.callHandler('tapped', {}, function (response) { | |
| console.log(response) // an empty object | |
| if(response) { | |
| // do something | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [bridge registerHandler:@"tapped" handler:^(id data, WVJBResponseCallback responseCallback) { | |
| responseCallback([NSNumber numberWithBool:TRUE]); | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment