Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIwebView links delay

I have a UIWebView with some links in it. When I click the link, there's a delay of about 2-3 seconds before the link is loaded. Is this how it's suppose to be or is there a setting I can change? Thanks.

like image 867
sumderungHAY Avatar asked Jun 24 '11 16:06

sumderungHAY


1 Answers

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]

This way you don't have to use any javascript libraries to remove the delay.

As a bonus, you can make the scrolling in a UIWebView feel a bit more native by changing the decelerationRate:

[webView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal]
like image 62
reekris Avatar answered Nov 20 '22 12:11

reekris