I have a view controller that contains a table view and displays custom cells. I'm trying to react to a content size category change using the traitCollectionDidChange
method (within the cell subclass), but this method is never called for the cells when this trait changes. On the other hand, it does get called when the size class changes.
traitCollectionDidChange
is called for the view controller (when the content size category changes) and I can manually propagate the call to the visible cells, but it feels like extra work. Why is it not getting called for the cell subclasses specifically for the content size category change?
Edit for reasoning why I want the call within the cell:
I want to change the cell's label to multi-line when the content size category is associated with accessibility, but keep it single-line otherwise. I've noticed this behavior in certain iOS apps, e.g. Apple Music.