Skip to content
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

开启系统辅助功能粗体文本的情况下,设置了 tintColorAdjustsTitleAndImage 的 QMUIButton 在 App 切到桌面再切回来时颜色错误 #1452

Closed
MoLice opened this issue Oct 12, 2022 · 1 comment
Labels

Comments

@MoLice
Copy link
Collaborator

MoLice commented Oct 12, 2022

Bug 表现

iShot_2022-10-13_06.27.21.mp4

经测试,和以下几个因素有关系:

  1. 4.5.1 里为 UIImageView、UIButton 配合 template image 使用时无法通过 tintColor 来修改图片的颜色 #1418 放开的 -[UIView setTintColor:] 的 hook,每次都把 tintColor 做一次 copy。把这段去掉就没问题。
  2. QMUIThemePrivate 里为 QMUIButton 注册的 @selector(tintColorAdjustsTitleAndImage),把这个去掉就没问题。
  3. QMUIButton.tintColor 每次设置时会被 copy,但 QMUIButton.tintColorAdjustsTitleAndImage 却一直都是原始的值,所以如果结合第2点,切换 theme 时就会导致调用 setTintColorAdjustsTitleAndImage: 时把旧的 tintColor 又重新设置给 self.tintColor。

但暂不清楚为什么关闭粗体文本就没问题。

其他信息

  • iOS 版本:仅测试了 iOS 14、15、16 都有问题
  • QMUI 版本: 4.5.1
@MoLice MoLice added the bug label Oct 12, 2022
@MoLice
Copy link
Collaborator Author

MoLice commented Dec 7, 2022

已修复该问题,请根据 iOS 版本支持情况选择升级到 4.6.0(iOS 11-16)4.6.1(iOS 13-16)

@MoLice MoLice closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant