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.
I’m using MPMoviePlayerController in iOS. I’m listening on any errors it may have while
Share
Try this:
Set a boolean to
truewhen you pop up an alert, set it tofalsewhen you close an alert, and always check the boolean to see if it’struebefore you pop up an event. If it istrue, you’ll know you have an alert window already showing.You can find this solution and some other discussion here.