Unfortunately this solution can be a breaking update for a set of users: keyWindow may return anything that covers the application's window (like a keyboard or UIAlertView window), so the most generally applicable solution is still using windows.firstObject.
Unfortunately this solution can be a breaking update for a set of users: keyWindow may return anything that covers the application's window (like a keyboard or UIAlertView window), so the most generally applicable solution is still using windows.firstObject.