MFMailComposeViewController not dismissing

前端 未结 5 866
名媛妹妹
名媛妹妹 2021-01-05 04:53

I have the following code that gets called in didSelectRowAtIndexPath. The issue is, when I click the cancel button, it prompts for save draft or discard. But when I click

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-05 05:52

    Use:

    dismissViewControllerAnimated:completion:
    

    DEPRECATED FROM IOS 6.0:

    Add this method to your class:

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

    Have fun

提交回复
热议问题