Maybe it’s a stupid question, but how can you detect if an alert is visible, if that alert belongs to another view controller?
I mean, if the alert (call it myAlert) belongs to the view controller I am checking, then using [myAlert isVisible] will tell you. But if the alert belongs to another view controller (call it myOtherAlert), and even worst if you have 10 other view controllers, what do you do? Check for every possible myOtherViewController.myOtherAlert? Isn’t there a better way?
What if you have a (global) variable that every time you open an alert you increase it by 1 and every time you (well, the user) close one (but then, you must go through the delegate to detect the closing) you decrease by 1. Then if the variable is equal to zero, there is no alert active. Sounds to much work, but it is … language independent.