UIWEBVIEW double click detection code ?

Discussion in 'iOS Programming' started by jagatnibas, Sep 19, 2011.

  1. jagatnibas macrumors regular

    Joined:
    Jul 28, 2008
    #1
    http://www.developers-life.com/touchbegantouchend-in-custom-uiwebview.html

    I am trying to detect a double tap on UIWebView as per link mentioned above. The problem is that it compiles and runs well, but when it executes

    [self __touchesBegan:touches withEvent:event]; it crashes with unrecognised selector.

    when i put mouse over self, i see it to be pointing to UIWebBrowserView * Where does this class come from ? What is that term "UIWebDocumentView" meaning here in the code ?

    please help, thanks in advance.
     
  2. North Bronson macrumors 6502

    Joined:
    Oct 31, 2007
    Location:
    San José
    #2
    In my experience, you should consider the UIWebView a black box. It's not a good idea to call private API, overwrite private API, swizzle methods, or any other shenanigans.

    Is there a way that you can redesign your application so that this will not be a problem? If the fundamental functionality of your application is dependent on processing touches in the web view, you might want to go back and do things differently.
     

Share This Page