Skip to content

Fix issue that textColor of AnimateableLabel refers incorrect userInterfaceStyle#601

Merged
msaps merged 2 commits intouias:mainfrom
Gyuni:main
Aug 20, 2022
Merged

Fix issue that textColor of AnimateableLabel refers incorrect userInterfaceStyle#601
msaps merged 2 commits intouias:mainfrom
Gyuni:main

Conversation

@Gyuni
Copy link
Copy Markdown
Contributor

@Gyuni Gyuni commented Jul 1, 2022

before.mov

When viewController overrides userInterfaceStyle as .light and contains AnimateableLabel as subview, it refers wrong traitCollection and shows wrong text color. In this case, AnimateableLabel refers .dark which is system setting of my simulator.

Therefore I modified two codes.

  1. UIColor.interpolate() returns dynamicColor on iOS 13 and higher
  2. AnimateableLabel's textColor refers AnimateableLabel's traitCollection
after.mov

Now it works well.

Please consider it.
Thank you 😄

Copy link
Copy Markdown
Member

@msaps msaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great thank you ❤️

@msaps msaps merged commit 354682a into uias:main Aug 20, 2022
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.

2 participants