swipe-back-control
Version:
Capacitor plugin to enable or disable the swipe back gesture on iOS devices for specific pages.
25 lines (24 loc) • 847 B
TypeScript
export interface SwipeBackControlPlugin {
/**
* Enable or disable swipe back gesture for the current page
* @param options Configuration options for swipe back control
* @returns Promise that resolves when the operation is completed
*/
enableSwipeBack(options: {
enabled: boolean;
currentPage: string;
}): Promise<void>;
/**
* Disable swipe back gesture for the current page
* @returns Promise that resolves when the operation is completed
*/
disableSwipeBack(): Promise<void>;
/**
* Check if back button should be blocked for the current page (Android only)
* @returns Promise that resolves with information about whether back should be blocked
*/
shouldBlockBackButton(): Promise<{
shouldBlock: boolean;
currentPage: string;
}>;
}