sudhakar sudhakar - 2 months ago 7
iOS Question

Why won't the MFMailComposeViewController's Cancel or Send buttons work?

I have a problem...

I create a MFMailComposeViewController and it shows up.

However, neither the Send nor the Cancel button work.

Answer

You have to put on this code in ur application,

   - (void)mailComposeController:(MFMailComposeViewController*)controller     didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error 
{   
[self dismissModalViewControllerAnimated:YES];
}

Try this one and it works send and cancel buttons properly.

Comments