Reputation: 1394
If suppose user has opened a mail composer inside the app and before closing mail composer, goes background. And next time when he launches the app, I wish to dismiss the mail composer. How do I check whether mail composer is present upfront and how do I dismiss it?
Upvotes: 1
Views: 43
Reputation: 318774
The class that presents the mail composer should register for the UIApplicationDidEnterBackgroundNotification
notification.
Upon receipt of the notification, you can dismiss the mail composer.
No need to wait until the user launches the app again. Do it when the app enters the background.
Upvotes: 1