I am trying to figure out how to implement JavaScript functions inside my iOS app using swift platform .
I have tried out the example code specified in the link
https://tetontech.wordpress.com/2014/07/15/swift-to-javascript-and-javascript-to-swift-a-round-trip/
But i want in the same way like android
is doing as specified in the link http://android-er.blogspot.in/2011/10/call-javascript-inside-webview-from.html
Could you please help me out.
Any help will deeply appriciated.
If you are using
WKWebView
you can call javascript by usingFor
UIWebView
you can useThese two links (first, second) are helped to me solve my problem.
html/javascript code:
My ViewController looks like this: