-
Notifications
You must be signed in to change notification settings - Fork 49
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
关于 iOS 侧滑返回手势的交互解决方案 #2
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
flutter_thrio 默认会将所有的 Flutter 页面的
UINavigationBar
隐藏掉,这样的话,FlutterViewController
的UIScreenEdgePanGestureRecognizer
会失效,而 flutter_thrio 会内嵌 Flutter 页面,所以正好利用了这一点,让 Flutter 页面自身的侧滑返回手势生效。然后当FlutterViewController
中只剩下一个 Flutter 页面时,需要将FlutterViewController
的侧滑返回手势加回来,实现方式是单独加了一个UIScreenEdgePanGestureRecognizer
,并将其 action 绑定到handleNavigationTransition
。所以如果原有工程已经使用了类似 FDFullscreenPopGesture 的第三方库的话,这里的行为是未知的。从我个人的角度,我建议将这类全屏滑动返回的交互去掉,原因如下:基于这些原因,引入 flutter_thrio 的时候遇到手势的问题,我能提供的方案是去掉原来的这类改造方案,flutter_thrio 本身只会对
FlutterViewController
进行改造,不影响原生页面。The text was updated successfully, but these errors were encountered: