title: How to set an app's UIWindow color when calling it from ViewController
body: <p>In the App delegate, it is possible to set an app's <code>UIWindow</code> color as seen in the code.</p>
  
  <p>However, when trying to set an app's <code>UIWindow</code> color to a different color in the <code>ViewController</code>, a call for example to <code>self.window?.backgroundColor = UIColor.blueColor()</code> gets ignored. No errors occur, but no color change occurs either.</p>
  
  <p>Question:</p>
  
  <p>1 - How can I set an app's window color when calling it in the <code>ViewController</code>?
  Note: I'm not trying to change a View background color, but the <code>UIWindow</code> color which sits behind a View.</p>
  
  <pre><code>class AppDelegate: UIResponder, UIApplicationDelegate {
  
      var window: UIWindow?
  
      func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -&gt; Bool {
  
          self.window?.backgroundColor = UIColor.redColor()
  
          return true
  
      }
  
  }
  </code></pre>