I tried some methods to disable bounce effect set no-bounce attribute to ion-content
<ion-content no-bounce></ion-content>
And added styles to ion-content to disable bounce. Still no fix to my problem.
It works on Ionic 4 with this. (Sorry, I don't have an explanation).
<ion-content no-bounce has-bouncing="false" forceOverscroll="false">
After couple of hours, I have find an answer from Github issues and I would like to share the solution, which then will disable the bounce effect in the iOS device.
Steps:
- Run command,
ionic cordova platform add ios && ionic cordova prepare ios
- Then find
CDVWKWebViewEngine.m
, inside/platforms/ios/<ionic-project>/Plugins/cordova-plugin-ionic-webview/
- Put this line of code at the bottom of the lines and save it.
@implementation UIScrollView (NoBounce)
- (void)didMoveToWindow {
[super didMoveToWindow];
self.bounces = NO;
}
@end
Credit link: https://github.com/ionic-team/ionic-v3/issues/113
Tested on Ionic 4, working on iOS device
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