Cast things and use UIApplication to get the keyWindow