开发者

Is there a notification on iOS if a UIAlertView is shown?

开发者 https://www.devze.com 2023-04-11 07:09 出处:网络
Wondering if there is a notification available if a UIAlertView pops up? Background: my app asks the user for a PIN after a period of inactivity but I would like to prevent it if an alert is on screen

Wondering if there is a notification available if a UIAlertView pops up? Background: my app asks the user for a PIN after a period of inactivity but I would like to prevent it if an alert is on screen. I don't want to go开发者_JAVA技巧 through my code and find all alerts and disable the PIN checker, instead a notification would be awesome. Any hope with NSNotification?


Just found the answer. It is hidden in here:

Can I get message when I show UIAlertView

If you listen to the "UIWindowDidBecomeVisibleNotification" notification, it will also fire for your own alerts, not only for system alerts. For your own alerts, the application does not resign activiation however.

0

精彩评论

暂无评论...
验证码 换一张
取 消