Noticed that my MFMailComposeViewController that I use to modally pop a dialog to send email no longer works in iOS6. It still pops the dialog, but I can't set the body text, or input anything into the view. All I can do is press cancel.
The class implements the MFMailComposeViewControllerDelegate interface and here's some of the code:
//h file
@interface ASEmailSender : NSObject
//m file
@implementation MyEmailSender () <MFMailComposeViewControllerDelegate>
@end
@implementation MyEmailSender
...
- (void)emailFile:(ASFile *)file inController:(UIViewController *)viewController {
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
if ([MFMailComposeViewController canSendMail]) {
mailController.mailComposeDelegate = self;
[mailController setSubject:@"my subject"];
[mailController setMessageBody:@"msg body here" isHTML:NO];
[viewController showIsLoading:YES];
self.viewController = viewController
[viewController presentModalViewController:mailController animated:YES];
}
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[self.viewController dismissModalViewControllerAnimated:YES];
}
It works great in iOS5.