I've added ShieldConfigurationExtension to my project. The only thing that doesn't work for me is proper color for System Appearance.
Let's say I only wants to change color of title for shield, I create color in Asset Catalog with different light and dark appearance then create ShieldConfiguration
as shown:
ShieldConfiguration(title: ShieldConfiguration.Label(
text: "My title", color: UIColor(named: "mycolor") ?? .systemGray
))
This will make the title to be one of the variant of mycolor
BUT it looks to be randomly selected. Sometimes it has light appearance, sometimes dark and not always match selected system appearance. Other UI elements that I didn't set are properly changing theirs colors.
On the other hand if I use some system colors, it works as expected:
ShieldConfiguration(title: ShieldConfiguration.Label(
text: "My title", color: .label
))
.label
will always has proper color - white for dark mode and black for light
I've tried to use mycolor
inside main app and there it works as it should so the problem is happening only in ShieldConfigurationExtension