I donβt think there is any built-in method for determining if there are any warnings. The way I dealt with this in the past is to keep track of the warnings displayed, displaying them as a property:
UIAlertView *currentAlert;
and when they are fired, install:
currentAlert = nil;
Then you just check to see if currentAlert == nil before displaying another.
Obviously, there are main disadvantages of this method, including, but not limited to:
- it only works with the alerts you show, not system alerts.
- UIAlertViewDelegate
- currentAlert , viewControllers, , .
, .