setIosSwipeGestureEnabled
Enables or disables the iOS left-edge swipe-to-go-back gesture. Has no effect on Android.
Signature
import { setIosSwipeGestureEnabled } from '@apps-in-toss/web-framework';
declare function setIosSwipeGestureEnabled(options: {
isEnabled: boolean;
}): Promise<void>;
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
options.isEnabled | boolean | ✓ | true enables the swipe-back gesture; false disables it. |
Returns
Promise<void>— resolves once the setting is delivered.- In the devtools mock, a log entry is printed to the console.
iOS only
This API only takes effect on iOS. On Android the call is ignored.
Permission
No permission required.
Examples
Minimal
import { setIosSwipeGestureEnabled } from '@apps-in-toss/web-framework';
// Disable swipe-back.
await setIosSwipeGestureEnabled({ isEnabled: false });
Realistic — prevent accidental navigation during payment entry
import { setIosSwipeGestureEnabled } from '@apps-in-toss/web-framework';
import { useEffect } from 'react';
export function PaymentForm() {
useEffect(() => {
// Disable swipe-back while the user is filling in payment details.
setIosSwipeGestureEnabled({ isEnabled: false });
return () => {
// Restore when leaving the screen.
setIosSwipeGestureEnabled({ isEnabled: true });
};
}, []);
return <form>{/* Payment input fields */}</form>;
}
Try it live
Open the Navigation page in sdk-example and run the setIosSwipeGestureEnabled card.
Related APIs
setDeviceOrientation— lock the screen orientation.closeView— close the current view.
Related guides
- Guides — Mini-app navigation flow patterns — mini-app entry/exit, opening external URLs, and screen-context (orientation, awake, secure) patterns.
External references
@apps-in-toss/web-framework— SDK package. The actual exports are re-exported from@apps-in-toss/web-bridge.