Can't disable swipe to go back in Ionic on iOS


#1

Hey everybody,

I’ve been working on building a view with a combined map and sliding card element in Ionic 2, but these interactive components don’t really play too nicely with the ‘Swipe to go back’ feature of iOS and Ionic 2.

I’ve been working to try and disable swipe to go back, but seem to be having some difficulty with this. I’ve tried the following solutions:

  1. let config = { swipeBackEnabled:false };
    imports: [
    IonicModule.forRoot(MyApp, null, config),
    }

  2. <ion-nav id=“content” [root]=“rootPage” #content swipe-back-enabled=“false”>

And neither of these has seemed to have worked. This is a major issue impacting the usability of my app, so any advice on how to mitigate this situation would be greatly appreciated!

Thanks,
Kevin


#2

Have you tried
<ion-nav id=“content” [root]=“rootPage” #content swipeBackEnabled=“false”>


#3

i tried <ion-nav id=“content” [root]=“rootPage” #content swipeBackEnabled=“false”>
and IonicModule.forRoot(MyApp,{ swipeBackEnabled: false }),
but still i am facing this issue

ionic info:
@ionic/cli-utils : 1.17.0
ionic (Ionic CLI) : 3.17.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 6.2.3 browser 4.1.0 ios 4.5.2
Ionic Framework    : ionic-angular 3.9.1-201711081842

System:

Node : v8.7.0
npm  : 2.15.12
OS   : Linux 4.10