If you add only subview for mailcomposser, you need to remove it from self.view.In your code, you add subview and are also present,
If you use, use [self.view addSubview:picker.view];
than try to remove it.
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [controller.view removeFromSuperview]; }
I suggest using
[self.navigationController presentModalViewController:picker animated:YES];
for the current MFMailComposeViewController,
and use [self dismissModalViewControllerAnimated:YES];
to reject it.
source share