In my app, When I press the home button, I pop the application to rootviewcontroller login class. Now, in the previous class, if any alertview comes and without dismissing it I press home button, Problem appears. Next time I tap on app icon to bring it in fore ground, the login screen is there, but on top of it, previous class alertview is also there. How to remove the alertviews on applicationDidEnterBackground?
Share
Have a global (AppDelegate property or singleton) where you simply store the pointer to the last alert view displayed (and clear it when done). If the pointer is non-nil, dismiss it in DidEnterBackground or wherever.