title: How to change app theme (Light/Dark) programmatically in swift 5
body: <p>I have an app with up to 10 screens and in the settings screen, I have a toggle to switch between dark/light mode. I want to change the complete app theme on that toggle.</p>
  <p>Currently, the app theme change when I change the theme in iOS default settings. But I want the same behavior to happen for my app only.</p>
  <p>What I figure out till now is to set a theme variable in the user default and use this code conditional on each view controller</p>
  <pre><code>    view.overrideUserInterfaceStyle = // .dark // .light
  </code></pre>
  <p>I don't want to use any third party library.</p>