Arosha
Arosha

Reputation: 1401

Page can be dragged down in iPhone - Framework7 Cordova

I use Framework7 and Cordova wrapper for my IOS app and I need to disable dragging effect in my content.

I have tried disabling pull-to-refresh effect from Cordova side but still the content is draggable and returns original position when release.

Below are not giving expected results

 <preference name="DisallowOverscroll" value="true" />
 <preference name="UIWebViewBounce" value="false" />

My app is not refreshing when drag down, so I guess it is nothing to do with pull-to-refresh feature. I need to make sure only scrolling works when dragging.

enter image description here

Upvotes: 1

Views: 307

Answers (1)

moo moo
moo moo

Reputation: 484

I was also searching for a solution and found one.

  1. Open your project in XCode.
  2. At the end of CDVWKWebViewEngine.m, add:
@implementation UIScrollView (NoBounce)
- (void)didMoveToWindow {
   [super didMoveToWindow];
   self.bounces = NO;
}
@end

Credits: https://github.com/ionic-team/ionic-v3/issues/113#issuecomment-391996908

Upvotes: 1

Related Questions