I have a Cocoa app that uses a WebView to display an HTML interface. How would I go about calling an Objective-C method from a Javascript function within the HTML interface?
views:
1823answers:
3Thanks, somehow missed that in my Google searches :)
georgebrock
2008-09-18 13:25:10
A:
i have a solution using NimbleKit.....where i can call objective c function from javascript..
Rony
2010-07-18 09:41:24
A:
If you wanna do it in iPhone apps, you would need to do a trick with the UIWebViewDelegate method shouldStartLoadWithRequest:
This api http://code.google.com/p/jsbridge-to-cocoa/ does it for you. It is very lightweight.
Terry
2010-09-13 19:43:06