如何防止在 ios 设备上滑动导航 (Nativescript)
How to prevent navigation swipe on ios devices (Nativescript)
onPageLoaded(args) {
args.object.ios.navigationController.interactivePopGestureRecognizer.enabled = false;
}
此代码无效
非常感谢你的帮助
您可以使用 Page
中的 enableSwipeBackNavigation
属性。
import { Page } from '@nativescript/core';
...
export class AppComponent {
constructor(
private page: Page
) {
page.enableSwipeBackNavigation = false;
}
}
onPageLoaded(args) {
args.object.ios.navigationController.interactivePopGestureRecognizer.enabled = false;
}
此代码无效
非常感谢你的帮助
您可以使用 Page
中的 enableSwipeBackNavigation
属性。
import { Page } from '@nativescript/core';
...
export class AppComponent {
constructor(
private page: Page
) {
page.enableSwipeBackNavigation = false;
}
}