I wasn't there, so I don't have what you are looking for, but what I can tell you is that there is no magic. It's only really two methods:
In objective-c land, you can call:
UIWebView stringByEvaluatingJavaScriptFromString:
and listen for events like with your delegate:
webView:shouldStartLoadWithRequest:navigationType:
from javascript land you can call:
document.location.href = "myspecialprotocol://whateveraction"
When you see the custom protocol, perform whatever logic and return false.
-slf
On Sep 21, 2012, at 2:52 PM, Stephen Sebeny wrote:
> Hi,
>
> Sorry if this is too far off-topic.
>
> I used to live in Arlington, VA, from early 2007 through early 2009.
> During that time I attended a couple for the first NSCoderNightDC events
> and for some reason am still on this list. :-)
>
> In the spring of 2008 (I believe) the DC/NOVA CocoaHeads group was just
> getting started and the meetings were being held at some start-up out
> along the Dulles Toll Rd IIRC. Anyway, at one of those meetings (I'm
> thinking it was around June 2008) someone did a great presentation on
> interaction between JavaScript and Cocoa. They had a Cocoa app with a
> WebView. There was a slider in the app with a text field showing the
> slider value, and the same on the web page loaded in the webView. And the
> values of the two sliders were bound together. So when the slider on the
> web page was moved it updated the slider in the native Cocoa part of that
> app. (I may be mis-remembering slightly, but this was the gist of the
> idea.)
>
> I have been searching my old files to try to find that sample code that
> was presented and I haven't have any luck. And when searching on-line I
> haven't found anything too similar. (Must be using the wrong search
> terms.) And even most the links to Apple docs that I seem to turn up and
> dead and redirect to the top level doc pages were I can't seem to find
> anything about this type of capability.
>
> Does anyone have a copy of the sample code that was presented at that
> CocoaHeads meeting back in 2008? Or know who the presenter was? Or at
> least know what the proper terms are to search on to find the equivalent
> modern documentation for this type of thing?
>
> Any responses are much appreciated. Thanks!
>
> -----
> Stephen
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "NSCoderNightDC" group.
> To post to this group, send email to nscodernightdc@googlegroups.com.
> To unsubscribe from this group, send email to nscodernightdc+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nscodernightdc?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "NSCoderNightDC" group.
To post to this group, send email to nscodernightdc@googlegroups.com.
To unsubscribe from this group, send email to nscodernightdc+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nscodernightdc?hl=en.
0 comments:
Post a Comment