traitCollectionDidChange not called on custom UIView subclass when switching to Dark Mode

594 Views Asked by At

I have created a custom UIImageView subclass which adds some custom drawing. This works fine but now I would like to adapt the class to work with iOS 13 Dark Mode.

I added traitCollectionDidChange: to the class to get notified of style changed and update the view accordingly. However when the style changes (updated in the device settings) the method does not get called and thus the view cannot handle the change and update it self.

How to solve this?

0

There are 0 best solutions below