Skip to content

Fix set badge tint color#615

Merged
msaps merged 1 commit intouias:mainfrom
mlmorgan:feature/fix-set-badge-tint-colour
Jul 16, 2023
Merged

Fix set badge tint color#615
msaps merged 1 commit intouias:mainfrom
mlmorgan:feature/fix-set-badge-tint-colour

Conversation

@mlmorgan
Copy link
Copy Markdown
Contributor

Given a button badge is behind a modally presented view controller, when the tint color of the badge is set, then the badge color will be gray instead of the set color.

One way to fix this is to utilise tintColorDidChange instead of using a didSet for tintColor.

In these before and after examples, the badge tint color is being set to red in onTraitCollectionDidChange, which is being triggered by changing from dark to light mode (or vice versa):

Before:
https://user-images.githubusercontent.com/34710656/231182379-da87b0af-b8f8-4048-876f-8ef460340db1.mp4

After:
https://user-images.githubusercontent.com/34710656/231180867-72d0c09b-6c32-43d4-a256-450c3a7b745b.mp4

The downside to this fix is that the doc comment is removed. Another fix would be to use a new var instead of overriding tintColor, but that would create breaking changes.

@msaps
Copy link
Copy Markdown
Member

msaps commented Jul 16, 2023

Thanks for the contribution! 😄 and sorry for the delay 🚀

@msaps msaps merged commit 6480a22 into uias:main Jul 16, 2023
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