title: Get Application's main window
body: <p>UIApplication has a method <code>keyWindow</code>, however if an alert view is showing then this returns the window of the alert view and not the main window of the application.</p>
  
  <p>How can I get the app's main window?</p>