I'm using MPMoviePlayerController in iOS. I'm listening on any errors it may have while playing videos. In my error handlers, I pop up an UIAlertView. Sometimes errors may occur in quick succession of each other and thus multiple alert boxes will stack up. For a better user experience, I wish to not pop up another alert if an earlier one is still displayed.
Set a boolean to
true when you pop up an alert, set it to
false when you close an alert, and always check the boolean to see if it's
true before you pop up an event. If it is
true, you'll know you have an alert window already showing.