First off - LOVE this library!
I wanted to ask if there were any way to used named/dynamic colors, such that the color changes when the device changes UIUserInterfaceStyle (i.e. from Light Mode to Dark Mode)
This feature is available for UIColor in iOS 13+ using UIColor(named:) if using Asset Catalogs or:
let dynamicColor = UIColor { (traitCollection: UITraitCollection) -> UIColor in
switch traitCollection.userInterfaceStyle {
case
.unspecified,
.light: return .white
case .dark: return .black
}
}
if creating them programmatically.
I noticed that the initialisers for Color in Macaw don't seem to allow for this.
If it's not currently supported, are there any plans to do so?
Alternatively, how would I go about manually changing the colours of my nodes upon detecting a change in the UIUserInterfaceStyle?
Hi, @project-academy , actually Macaw doesn't support dark mode for now, but it is good idea to add minimal methods for supporting changing trait collection etc
Hi there,
First off - LOVE this library! I wanted to ask if there were any way to used named/dynamic colors, such that the color changes when the device changes UIUserInterfaceStyle (i.e. from Light Mode to Dark Mode)
This feature is available for UIColor in iOS 13+ using
UIColor(named:)
if using Asset Catalogs or:if creating them programmatically.
I noticed that the initialisers for Color in Macaw don't seem to allow for this. If it's not currently supported, are there any plans to do so?
Alternatively, how would I go about manually changing the colours of my nodes upon detecting a change in the UIUserInterfaceStyle?
Cheers, Saf