My problem was also described here UIColor return wrong values for dark mode colors by Lee Andrew
Basically border color for buttons is not being picked properly. In my case scenario is:
- Open VC1 in white mode.
- Push VC2 in white mode.
- Switch to dark mode in VC2.
- UI updated correctly.
- Moving back through navigation to VC1
Button's border there was not updated properly. It was using color for white mode, text however changed color properly.
Solution for layer.background proposed in question listed above doesn't help... using not beta xcode Version 11.0 (11A420a) if that helps. Can really use help here... I'm out of options. Calling setNeedsDisplay for button doesn't help either.
Update. Got the thing sorted out. Direct call of the button didn't work. However after I've overrided traitCollectionDidChange method on everything with button with border color (cells, footer, header, etc) - thing begin to work properly.