
25年的雨水太少 小区的树木枯死很多 希望缺的冬天补上
一、 右滑返回退出flutter页面
使用Xcode26刚打包的包在iOS26上测试发现右滑直接退出了flutter的页面回到了native页面,此时不管flutter页面中跳转了很多次。
- 第一反应就是flutter新增加东西了,
- iOS26应该新增加东西了,
- flutter还没适配吧!

二、解决
一番搜索后确认是iOS26新增的interactiveContentPopGestureRecognizer
属性的,问题。那么在跳转到FlutterViewController
的时候直接设置为false。
swift
@objc
private func jumpToTaskVC() {
let vc = HXDispatchMainFlutterViewController.init(withEntrypoint: nil)
self.navigationController?.pushViewController(vc, animated: false)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
if #available(iOS 26.0, *) {
self.navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = false
} else {
// DO nothing
}
完美。

END
问了AI,尝试了AI提供的所有办法都不行。 AI还是需要努力啊,无法解决人类不知道的,或者没有告诉AI的事。