Reputation: 3368
whenever I make a tap action on a UIWebView, for example clicking a link, there is a slightly delay between the tap and the actual highlighting / activating of the link.
Is there a way to disable this delay?
I've read that this would be possible in UIScrollView with
setDelaysContentTouches:NO
Is this also possible in UIWebViews?
Upvotes: 4
Views: 6037
Reputation: 548
In iOS5 the UIScrollView belonging to a UIWebView has been exposed so that you can change its behavior. So to remove the click delays you can simply do:
[webView.scrollView setDelaysContentTouches:NO]
As a bonus, you can make the scrolling in a UIWebView feel a bit more native by changing the decelerationRate:
[webView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal]
Upvotes: 5
Reputation: 39502
This is the solution I used:
http://cubiq.org/remove-onclick-delay-on-webkit-for-iphone
Upvotes: 5