Skip to content

适配LiquidGlass、UIScene、修复一系列issue#1672

Open
CloudlessMoon wants to merge 29 commits intoTencent:masterfrom
CloudlessMoon:master
Open

适配LiquidGlass、UIScene、修复一系列issue#1672
CloudlessMoon wants to merge 29 commits intoTencent:masterfrom
CloudlessMoon:master

Conversation

@CloudlessMoon
Copy link
Copy Markdown

适配LiquidGlass、UIScene、修复一系列issue

2、ruanmei-fix,适配LiquidGlass
@tencent-adm
Copy link
Copy Markdown
Member

tencent-adm commented Sep 11, 2025

CLA assistant check
All committers have signed the CLA.

qmui_updatesIndicatorView、qmui_badgeView需要改成block实现了,返回一个View实例
2、QMUIModalPresentationViewController 兼容键盘已经弹起的情况
…deUserInterfaceStyle 为light或者dark后,无法触发回调的问题
…nScreen.traitCollection更准确些,[UITraitCollection currentTraitCollection]是基于当前上下文
…howInWindow:(nullable UIWindow *)window,用于多个windowScene的情况下, 业务可以选择某个window去show,避免被遮挡
…dth,不然当有足够的空间时,会因maximumHeight/maximumWidth计算错误
@codingiran codingiran mentioned this pull request Oct 14, 2025
…ltTraitCollection,其他平台使用_parentWillTransitionToTraitCollection:
@zhenian
Copy link
Copy Markdown

zhenian commented Oct 20, 2025

CLA assistant check Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

看流程检查, 需要 @CloudlessMoon ,签署一个同意协议 Contributor License Agreement 才能有机会合代码接受贡献

@a714857512
Copy link
Copy Markdown

什么时候有新tag出来呀,一年多了

@SethCody
Copy link
Copy Markdown

SethCody commented Apr 3, 2026

手势侧滑返回,页面卡死的情况,有人出现吗,页面展示的是A,实际已经在B了

@CloudlessMoon
Copy link
Copy Markdown
Author

手势侧滑返回,页面卡死的情况,有人出现吗,页面展示的是A,实际已经在B了

发个复现的demo看下

…需要用新的私有方法

② 修复- (void) handleKeyWithString:(id)arg1 forKeyEvent:(id)arg2 executionContext:(id)arg3; 失效的问题
@nouslove
Copy link
Copy Markdown

shouldPopViewControllerByBackButtonOrPopGesture:无法拦截手势或者按钮事件

② _UINavigationBarContentView更换为UIKit.NavigationBarContentView
@CloudlessMoon
Copy link
Copy Markdown
Author

shouldPopViewControllerByBackButtonOrPopGesture:无法拦截手势或者按钮事件

2928b30 看这个commit,返回按钮拦截失效的问题解决了。我们项目里没用到返回手势拦截,我也没时间去看,你可以搜索canPopViewController看看怎么改

@nouslove
Copy link
Copy Markdown

shouldPopViewControllerByBackButtonOrPopGesture:无法拦截手势或者按钮事件

2928b30 看这个commit,返回按钮拦截失效的问题解决了。我们项目里没用到返回手势拦截,我也没时间去看,你可以搜索canPopViewController看看怎么改

感谢,如果有时间的话可以看下手势返回拦截这个问题,使用AI修改很多次都未成功,目前还在尝试。

@nouslove
Copy link
Copy Markdown

nouslove commented Apr 30, 2026

shouldPopViewControllerByBackButtonOrPopGesture:无法拦截手势或者按钮事件

2928b30 看这个commit,返回按钮拦截失效的问题解决了。我们项目里没用到返回手势拦截,我也没时间去看,你可以搜索canPopViewController看看怎么改

感谢,如果有时间的话可以看下手势返回拦截这个问题,使用AI修改很多次都未成功,目前还在尝试。

可以了,iOS 26 引入了一个新的全屏滑动返回手势 interactiveContentPopGestureRecognizer(内部类名 _UIParallaxTransitionPanGestureRecognizer,标识为 UINavigationController.contentSwipe)。

系统在这两个手势之间设置了一个依赖关系:

edgeSwipe.must-fail-for = { contentSwipe }
这个依赖的含义是:edgeSwipe 必须等 contentSwipe 先失败,才能开始识别。

在 iOS 26 之前,只有 edgeSwipe 一个手势,QMUI 通过替换它的 delegate,在 gestureRecognizerShouldBegin: 里返回 NO 来拦截返回。

iOS 26 之后,用户做滑动时,系统先让 contentSwipe 去识别。contentSwipe 的 delegate 是系统原生的 _UINavigationInteractiveTransition,不受 QMUI 控制,它直接返回 YES 并成功触发了返回。由于 contentSwipe 成功了,edgeSwipe 根据 must-fail-for 规则永远不会被激活,QMUI 替换的那个 delegate 自然也就永远不会被调用到。

所以 shouldPopViewControllerByBackButtonOrPopGesture: 虽然返回了 NO,gestureRecognizerShouldBegin: 也确实被调用并返回了 NO,但那是 edgeSwipe 的 delegate,而实际触发返回的根本不是 edgeSwipe。

目前修复方式通过钩子在 viewDidLoad 中禁用 interactiveContentPopGestureRecognizer,解除
edgeSwipe 的 must-fail-for 依赖,使边缘手势恢复正常识别,QMUI 原有拦截
逻辑重新生效。

#ifdef IOS26_SDK_ALLOWED
if (@available(iOS 26.0, *)) {
selfObject.interactiveContentPopGestureRecognizer.enabled = NO;
}
#endif

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

Successfully merging this pull request may close these issues.

6 participants