In my hybrid
app there's a possibility to drag the screen to refresh the list. In Android
this works fine, but on iOS
when I'm dragging down it sometimes confuses it with scrolling the page so it has that overflow/bouncing effect.
In ionic
there's an attribute you can use to disable this, but it's not working:
<ion-content id="questions" has-bouncing="false">
config.xml already has these lines of code:
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
Solution for Ionic 2:
<ion-content no-bounce>
You will need to set overflow-scroll
to false
like :
overflow-scroll="false"
Works on Ionic 1.3
on ionic 4 <ion-content no-bounce has-bouncing="false" forceOverscroll="false">
. If this fail force to remove bounce with.
To remove and force the not bounce in the component ion-content on ios, create the file DisableBounce.m With the following content.
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@implementation UIScrollView (NoBounce)
- (void)didMoveToWindow {
[super didMoveToWindow];
self.bounces = NO;
}
@end
and to save on platforms/ios/CordovaLib/Classes/Private/Plugins/CDVUIWebViewEngine. this disable all efect bounce in you app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With