Search code examples
iphoneobjective-cemailsavemfmailcomposeviewcontroller

MFMailComposeViewController and cancelling "save" action sheet?


i am using MFMailComposeViewController inside my iphone app. I notice that if i enter any text in the body and then press the cancel button, i am prompted with an action sheet with an option to save/don't save the unsent message. I have two questions:

  1. can I programmatically prevent the "save/don't save action sheet from appearing? MFMailComposeViewControllerDelegate doesn't appear to have anything along those lines

  2. if i do save, where is the mail saved to? i looked in my mail accounts and didn't see anything saved in any of the "draft" folders.


Solution

    1. No, you can't avoid the action sheet appearing. It's been added in iOS 4.x to, precisely, avoid tapping on the "Cancel" button inadvertently when writing a long email, which I think it's a good idea.
    2. It is saved in "Drafts" folder of the account used to compose the e-mail (normally, your "default account" as it is registered in the Settings of your device). I've just tried using a couple of apps and it works.