在官方示例的基础上通过 interactionControllerForDismissal 方法实现了侧滑手势返回功能:https://github.com/qianshou/DCUniMPPresentCustomAnimation
这个改造可以实现侧滑返回,但是如果侧滑比例没有超过0.5应该是要取消返回操作的,但是一旦调用了 cancelInteractiveTransition 方法以后uniApp小程序就会失去响应,点击没反应,也没办法关闭了。做过测试如果present的是一个其他普通的ViewController,在调用了cancelInteractiveTransition后,取消操作是正常的,猜测是不是DCUniMPViewController在viewWillDisappear里面做了什么操作?导致侧滑取消后就不能正常使用了?求官方大大解答
0 个回复