Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content color is not always correct for Dark Mode. #43

Closed
Dean151 opened this issue Nov 14, 2022 · 1 comment
Closed

Content color is not always correct for Dark Mode. #43

Dean151 opened this issue Nov 14, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Dean151
Copy link

Dean151 commented Nov 14, 2022

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

@Dean151 Dean151 added the bug Something isn't working label Nov 14, 2022
Dean151 added a commit to Dean151/SPAlert that referenced this issue Nov 14, 2022
@ivanvorobei
Copy link
Member

Fixed in last version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants