Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问怎么拦截 侧滑返回pop #196

Open
roycehe opened this issue Jul 20, 2021 · 3 comments
Open

请问怎么拦截 侧滑返回pop #196

roycehe opened this issue Jul 20, 2021 · 3 comments

Comments

@roycehe
Copy link

roycehe commented Jul 20, 2021

如题哈, 有类似shouldPop这种方法吗

@listenzz
Copy link
Owner

@roycehe 没有

建议修改交互。

当页面左上角出现返回按钮时,给用户的暗示就是可以侧滑返回,可以点击按钮返回,可以点击返回键(android)返回。

如何希望拦截用户操作,则应该把返回按钮隐藏,在页面中间放个大按钮,或者通过 leftBarButtonItem 设置一个"取消"按钮。这些方式都暗示用户不可通过侧滑等方式返回,此时设置 backInteractive 为 false, 禁止用户通过侧滑或物理返回键(android)退出当前页面。

@databos-dev
Copy link

@listenzz 请问这个backInteractive加在什么地方 ,没看到哪里有这个属性

@listenzz
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants