views:

583

answers:

1

I have an app that is built on the TabBar-based app in which I need to have one tab that is basically an email composer. So I'm trying to use a MFMailComposeViewController as one of the tabs. This seems to work fine until I actually go to send an email with the controller. If I do this the MFMailComposeViewController's view disappears and can't be used again.

If I'm reading the docs correctly, the MFMailComposeViewController is normally used modally, but it is supposed to work non-modally as well.

This is how I am adding it to the tab bar...

MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
mailController.title = @"Feedback";
mailController.tabBarItem.image = [UIImage imageNamed:@"pencil.png"];
[array addObject:mailController];
tabBarController.viewControllers = array;
A: 

You you using

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error

and hides it with

[self dismissModalViewControllerAnimated:YES];

If so then just comment dismissing.

slatvick