We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug 表现 UIButton.tintColor、UIImageView.tintColor为QMUIThemeColor,Image为UIImageRenderingModeAlwaysTemplate,「手动」切换主题后不生效,但是系统的主题切换是生效的
截图
如何重现 1. 2.在QDThemeViewController.m中点击按钮切换主题
Demo: QMUIDemo_iOS.zip
预期的表现 UIButton.tintColor、UIImageView.tintColor为QMUIThemeColor也可以正常生效
其他信息
The text was updated successfully, but these errors were encountered:
经测试,iOS 13-15 都有这个问题,iOS 12 及以下没问题是因为我们在 QMUIThemePrivate 里对 iOS 12 及以下的版本 hook 了 -[UIView setTintColor:],主动对 QMUIThemeColor 做一次 copy 从而触发系统的自动刷新。iOS 13 及以上没做这个处理,在手动切换 theme 时就出问题了。
-[UIView setTintColor:]
UIImageView 系统没重写 setTintColor:。UIButton 重写了但有调用 super,所以统一在 -[UIView setTintColor:] 内处理即可。
新版本会修复该问题,在此之前可本地修改 QMUIThemePrivate.m 里的 UIView (QMUIThemeCompatibility),把 hook -[UIView setTintColor:] 外面判断 iOS 版本的 if 去除即可。
UIView (QMUIThemeCompatibility)
Sorry, something went wrong.
已发布 4.5.0 修复该问题。
No branches or pull requests
Bug 表现
UIButton.tintColor、UIImageView.tintColor为QMUIThemeColor,Image为UIImageRenderingModeAlwaysTemplate,「手动」切换主题后不生效,但是系统的主题切换是生效的
截图
如何重现
1.
2.在QDThemeViewController.m中点击按钮切换主题
Demo:
QMUIDemo_iOS.zip
预期的表现
UIButton.tintColor、UIImageView.tintColor为QMUIThemeColor也可以正常生效
其他信息
The text was updated successfully, but these errors were encountered: