PDA

View Full Version : How to Create the Highlight/Note Popup Buttons from the iPhone Kindle app




ghayenga
Oct 28, 2009, 11:26 AM
Someone already asked the exact question I had over on Stack Overflow:

http://stackoverflow.com/questions/1611801/

Basically I can't figure out how the new Kindle app is overriding the UIMenuController and putting up their own menu items when someone does a tap and hold on what is obviously a UIWebView



dejo
Oct 28, 2009, 12:02 PM
...on what is obviously a UIWebView
You so sure about that? Maybe it's not. Maybe they've subclassed UIWebView so that they can override some of its default behavior.

ghayenga
Oct 28, 2009, 01:03 PM
You so sure about that? Maybe it's not. Maybe they've subclassed UIWebView so that they can override some of its default behavior.

A UIWebView subclass is still a UIWebView, and my point is that you don't get touch events in a UIWebView subclass. And I can't see any way to override that default behavior by subclassing a UIWebView. That's why I'm asking the question about how to do it.

dejo
Oct 28, 2009, 01:20 PM
A UIWebView subclass is still a UIWebView, and my point is that you don't get touch events in a UIWebView subclass. And I can't see any way to override that default behavior by subclassing a UIWebView. That's why I'm asking the question about how to do it.
One way to do it is to place a transparent UIView over the content view and trap the events from there. Sorry, that's kinda what I was hinting at with the "maybe it's not" remark.