Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping overscroll / bounce in Phonegap IOS

Tags:

cordova

I am using the latest version of Phonegap on IOS (ipad) and I can't seem to disable the vertical overscroll/bounce on the whole app. I don't mind it on inner elements but it looks rather strange when you swipe up or down and the whole app bounces up and down.

I've tried setting UIWebViewBounce to no in the .plist however that doesn't seem to have done anything.

Appreciate the help :)

like image 255
Josh Undefined Avatar asked Apr 29 '13 08:04

Josh Undefined


4 Answers

You have to modify a property in your config.xml file. Just set the following preference to true

<preference name="DisallowOverscroll" value="true" />
like image 68
dpfauwadel Avatar answered Nov 06 '22 14:11

dpfauwadel


The accepted answer did not work for me, I had to set UIWebViewBounce to false:

<preference name="UIWebViewBounce" value="false" />
like image 41
Yangshun Tay Avatar answered Nov 06 '22 15:11

Yangshun Tay


now for phonegap 3.0 above version use below syntex in config.xml file and it will works 100%

<preference name="DisallowOverscroll" value="true"/>
like image 15
Mayur Avatar answered Nov 06 '22 16:11

Mayur


If you're adding <preference name="DisallowOverscroll" value="true"/> to config.xml without any luck, you may be changing the wrong file. Instead, search the entire phonegap directory for "DisallowOverscroll." You should find several instances. Change those to true.

Cheers.

like image 6
Jerad Avatar answered Nov 06 '22 15:11

Jerad