2

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?

Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
  • 1
    Did you by chance override the trait collection in this view's controller (or any view higher in the hierarchy) via `overrideTraitCollection`? Is the method called when you change the Dynamic Font size of the system? – Frank Rupprecht Oct 11 '19 at 14:41

0 Answers0