title: What is the difference between UIApplication.sharedApplication.delegate.window and UIApplication.sharedApplication.keyWindow?
body: <p>Can anyone help me understand the difference between the following two lines:</p>
  
  <pre><code>[UIApplication.sharedApplication.delegate.window addSubview:myView];
  </code></pre>
  
  
  
  <pre><code>[UIApplication.sharedApplication.keyWindow addSubview:myView];
  </code></pre>