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 using
webView.evaluateJavaScript("YourJavaScript",completionHandler : nil )
For UIWebView
you can use
webview.stringByEvaluatingJavascriptFromString : @"YourJavaScript";