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
In config.xml of your project, under preferences for iOS set DisallowOverscroll to true. By default it is false which makes whole view to scroll along with inner elements of the view.
<preference name="DisallowOverscroll" value="true" />
There is a way I used to achieve this. but it's not conventional because it's dealing with native coding. In the MainViewController there is a method named webViewDidFinishLoad. Include this
theWebView.scrollView.bounces= NO;
inside that method.
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
// Black base color for background matches the native apps
theWebView.backgroundColor = [UIColor blackColor];
theWebView.scrollView.bounces= NO;
return [super webViewDidFinishLoad:theWebView];
}
As this is ios native code this'll work in any phonegap/cordova distribution.
Open xCode -> find and click on config.xml from left menu-> and change DisallowOverscroll value false to true Or use this code by replacing previous.
<preference name="DisallowOverscroll" value="true" />
If nothing else works, try to remove -webkit-overflow-scrolling: touch
from your css...if you had it!
It is better to modify two elements in config.xml as follows:
<preference name="DisallowOverscroll" value="true"/>
<preference name="UIWebViewBounce" value="false" />
this is what worked for my app running phonegap 3.0: add the following line to config.xml
<preference name="webviewbounce" value="false"/>