title: Detecting iOS Dark Mode Change
body: <p>I read through the documentation regarding: <a href="https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface" rel="noreferrer">https://developer.apple.com/documentation/appkit/supporting_dark_mode_in_your_interface</a></p>
  
  <blockquote>
    <p>When the user changes the system appearance, the system automatically asks each window and view to redraw itself. During this process, the system calls several well-known methods for both macOS and iOS, listed in the following table, to update your content.</p>
  </blockquote>
  
  <p>In our legacy app we create our views as lazy variables in the init of each class. This means the views won't get drawn out with the correct color if the user goes into settings and switches to dark mode.</p>
  
  <blockquote>
    <p>If you make appearance-sensitive changes outside of these methods, your app may not draw its content correctly for the current environment. The solution is to move your code into these methods.</p>
  </blockquote>
  
  <p>Our application is quite big and a refactor will be done to support this in a better way in the future but I'm wondering if there is a way to detect this changes with the notification center like what can be done for Mac OS:</p>
  
  <p><a href="https://stackoverflow.com/questions/39048894/how-to-detect-switch-between-macos-default-dark-mode-using-swift-3">How to detect switch between macOS default &amp; dark mode using Swift 3</a></p>