sparrowcode/AlertKit

Content color is not always correct for Dark Mode.

Dean151 opened this issue · 1 comments

Details

  • iOS Version 13+
  • Framework Version 4.2.0
  • Installed via SPM

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

Fixed in last version.