How to Create the Highlight/Note Popup Buttons from the iPhone Kindle app

Discussion in 'iOS Programming' started by ghayenga, Oct 28, 2009.

  1. macrumors regular

    Joined:
    Jun 18, 2008
    #1
    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
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    You so sure about that? Maybe it's not. Maybe they've subclassed UIWebView so that they can override some of its default behavior.
     
  3. thread starter macrumors regular

    Joined:
    Jun 18, 2008
    #3
    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.
     
  4. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    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.
     

Share This Page