I've found a couple questions on here related to the issue I'm having but since I'm fairly new to iOS development I'm not sure how/where people are implementing their solutions. Since I am also new to StackOverflow I cannot comment on their posts so any help would be greatly appreciated.
Detecting iOS Dark Mode Change
How to detect Light\Dark mode change in iOS 13?
I have a collectionView that when I change to and from Dark Mode, the cell borderColor is changing to what looks like black instead of the color it should be based on the systemGray color that I have assigned to it.
In the answers I linked above people suggested using layoutSubviews() and/or traitCollectionDidChange() but I'm not exactly sure where to implement those functions. I can't seem to find the functions in the definitions of UIViewController or UICollectionView.
When I reload the views using reloadData(), the colors change to what they should be but I would like to know when/where the functions layoutSubviews() and/or traitCollectionDidChange() are being called.