title: Make variables not reset when switching to a different view controller, and keep the variable like that when app is quit
body: <p>I'm making a weather app, and currently I'm adding support to switch from Imperial measurement to Metric, but when you switch from the settings view controller to the main menu to the weather viewer, it resets the unit variable to Imperial. </p>
  
  <p>I have looked at many questions and articles, and either:</p>
  
  <ol>
  <li>I don't understand how to do it</li>
  <li>It doesn't work or needs an older version of Swift </li>
  <li>It causes the whole app to break</li>
  </ol>
  
  <p>========================================================================  </p>
  
  <p>Note: I am using segues to switch VCs  </p>
  
  <pre><code>@IBAction func unitSwitcherMetric(_ sender: UIButton) {
  
      weatherDataModel.unit = "metric"
      weatherDataModel.windUnit = ""
      print("The unit is now \(weatherDataModel.unit)")
  
  }
  </code></pre>
  
  <p>After you select that button, it prints 
  <code>The unit is now metric</code>
  as expected, but when you switch to the main menu view controller, where it's supposed to print the unit variable, it prints <code>imperial</code> and the API supplies imperial measurements as well.</p>