I am using a UIWebView
in my app and I am overriding the shouldStartLoadWithRequest
message to detect what kind of link is being clicked. If it's a "special" link, I push a UIViewController
onto the stack and return NO from this method. This works just dandy most of the time.
Sometimes, however, I click on a link and my shouldStartLoadWithRequest
never gets called. Now what's weird is that the UIViewController which houses the UIWebView
is in a UITabBarController
and when I click on another tab, the UIWebView finally gets its shouldStartLoadWithRequest
called. Until I click this other tab, I do NOT get a call to shouldStartLoadWithRequest
. The other interesting bit is that the failure case never happens the first time I click on a link; it's always on a subsequent time.
Has anyone seen this? To me, this sounds like the UIWebView
is, sometimes, not getting a touchEnded event and by switching tabs, the underlying framework is forcing a touchEnded event which in turn causes my shouldStartLoadWithRequest
to get called.