title: Detecting Change in iOS Dark Mode
body: <p>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.</p>
  
  <p><a href="https://stackoverflow.com/questions/57706671/detecting-ios-dark-mode-change">Detecting iOS Dark Mode Change</a></p>
  
  <p><a href="https://stackoverflow.com/questions/58016866/how-to-detect-light-dark-mode-change-in-ios-13">How to detect Light\Dark mode change in iOS 13?</a></p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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.</p>