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 表现
如上图所示,当前系统是日间模式下,第一次设置的日间模式color与第二次设置的日间模式color相同,且第二次日/夜间模式color相同的情况下,切换夜间模式后,第二次设置的color不会生效
Bug原因
如上图所示,当设置CALayer.backgroundColor时会将存储的QMUIThemeColor还给CALayer,CALayer使用QMUIThemeColor.cgColor,通过UIView.backgroundColor = QMUIThemeColor也会去设置CALayer.backgroundColor,当「前后颜色相同」时,第二次并不会调用CALayer.backgroundColor,CALayer用的还是第一次设置的QMUIThemeColor,所以会造成上面的bug。
解决方案
另外,如下图所示,cgColor绑定QMUIThemeColor时应该用weak,上述表现也会引起QMUIThemeColor不能正确被释放
其他信息
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug 表现
如上图所示,当前系统是日间模式下,第一次设置的日间模式color与第二次设置的日间模式color相同,且第二次日/夜间模式color相同的情况下,切换夜间模式后,第二次设置的color不会生效
Bug原因
如上图所示,当设置CALayer.backgroundColor时会将存储的QMUIThemeColor还给CALayer,CALayer使用QMUIThemeColor.cgColor,通过UIView.backgroundColor = QMUIThemeColor也会去设置CALayer.backgroundColor,当「前后颜色相同」时,第二次并不会调用CALayer.backgroundColor,CALayer用的还是第一次设置的QMUIThemeColor,所以会造成上面的bug。
解决方案
如上所示,将qcl_originalBackgroundColor赋值即可另外,如下图所示,cgColor绑定QMUIThemeColor时应该用weak,上述表现也会引起QMUIThemeColor不能正确被释放
其他信息
The text was updated successfully, but these errors were encountered: