Harnessing The Power of Both Languages in Your Apps
The IB outlet and action of the app as follow. Note that we simply use
We also need to adopt the
WKScriptMessageHandler protocol in our view controller, and implement the
showText() method, the
window.webkit.messageHandlers.jsHandler.postMessage() is the method we use to trigger the delegate method implemented in our view controller.