bachonk / InitialsImageView

A simple UIImageView extension for using initials as a profile image, written in swift
MIT License
213 stars 41 forks source link

Add Dark Mode support #16

Open ohetzendorfer opened 4 years ago

ohetzendorfer commented 4 years ago

Hi, first of all, thank you for this library :)

Currently the background color doesn't get updated if the user switches between light and dark mode. This is because of using cgColor, which doesn't automatically update.

bachonk commented 4 years ago

Hey @omastny, thanks for your support. I'm guessing that you would expect lighter background colors with black text in a dark mode setting?

ohetzendorfer commented 4 years ago

Hi @bachonk,

this is already working if a view is initial loaded. But if a switch happens on the current view between dark and light, the color doesn't get updated.

Like described here "Update Custom Views Using Specific Methods" -> https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface/