Get Application's main window
11:58 24 Jul 2013

UIApplication has a method keyWindow, however if an alert view is showing then this returns the window of the alert view and not the main window of the application.

How can I get the app's main window?

ios objective-c uiwindow uiapplication