Dismissing UIAlertViews when entering background state
Apple recommends dismissing any UIAlertViews/UIActionSheets when entering background state in iOS 4. This is to avoid any confusion on the user's part when he relaunches the application later. I wonder how I could elegantly dismiss all UIAlertViews at once, without retaining a reference to it everytime I set one up... Any idea ? Guillaume I was intrigued by Dad's answer (funny username :), and curious why it was down-voted. So I tried it. Here is the .m part of a subclass of UIAlertView. Edit: (Cédric) I have added a way to catch calls to delegate methods and remove the observer then to avoid