You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
Content color is not always correct for Dark Mode.
Reason
When initiating the view, defaultContentColor is called from the initializer, looking for a window to get the traitCollection.
As the window is not defined yet, nil is returned, and lightColor will always be in use.
Solution for iOS 13+ only
Use UIColor.init(dynamicProvider: _)
Details
Describe the Bug
Content color is not always correct for Dark Mode.
Reason
When initiating the view,
defaultContentColor
is called from the initializer, looking for a window to get the traitCollection.As the window is not defined yet, nil is returned, and
lightColor
will always be in use.Solution for iOS 13+ only
Use
UIColor.init(dynamicProvider: _)
I'll make a PR about that.
EDIT: opened #44
I don't know yet how to fix it for iOS 12.x
The text was updated successfully, but these errors were encountered: