我可以在显示UIAlertView时收到消息 [英] Can I get message when I show UIAlertView

查看:128
本文介绍了我可以在显示UIAlertView时收到消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在系统显示UIAlertView时收到消息,这样我就可以暂停游戏了。

I want to get message when system show UIAlertView so I can pause my game.

任何人都知道怎么弄明白?

Anyone know how to figure out that?

UIAlertView不受我自己控制。

The UIAlertView is not controlled by myself.

推荐答案

应用代表的 applicationWillResignActive: 将在中断时调用。您可以在那里处理暂停,或者您甚至可以收听 UIApplicationWillResignActiveNotification 在视图控制器中暂停游戏。

Application delegate's applicationWillResignActive: will be called on interrupts. You can handle the pause there or you can even listen to the UIApplicationWillResignActiveNotification in your view controller and pause the game there.

您可以查看 iOS应用程序指南此部分 ,详细说明了应用程序和状态转换的生命周期。

You can look at this part of the iOS Application Guide that details the life cycle of the application and state transitions.

这篇关于我可以在显示UIAlertView时收到消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆