flutter右滑返回直接返回到native问题
iOS跳flutterViewController后,flutter1又跳了flutter2,flutter2侧滑返回总是返回到原生,期望侧滑返回到flutter1页面。
解决方案:
在iOS原生导航类 BaseNavigationController 中,修改下面代理方法,如果是flutter类,就禁用了iOS原生手势。这样flutter的侧滑手势优先级就上来了。
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{ if ([viewController isKindOfClass:[FlutterViewController class]]) { self.interactivePopGestureRecognizer.enabled = NO; } else { self.interactivePopGestureRecognizer.enabled = YES; } }
在北京的灯中,有一盏是我家的。这个梦何时可以实现?哪怕微微亮。北京就像魔鬼训练营,有能力的留,没能力的走……

浙公网安备 33010602011771号