Enable the back/forward swipe gestures support for iOS
npm install capacitor-swipe-back
npx cap sync
this only enable swipe back. U can't control behavior in runtime
# AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// other code
// capacitor v4
bridge.webview?.allowsBackForwardNavigationGestures = true;
// capacitor v3
bridge.getWebView()?.allowsBackForwardNavigationGestures = true;
return true
}
Enable the back/forward swipe gestures support for iOS
import { IosSwipeBackPlugin } from 'capacitor-swipe-back'
await IosSwipeBackPlugin.enable()
Disable the back/forward swipe gestures support for iOS
import { IosSwipeBackPlugin } from 'capacitor-swipe-back'
await IosSwipeBackPlugin.disable()