max
max

Reputation: 3

Xcode: Check whether email was send or canceled

I want to make a login with an email registration and for that I have to check whether the user clicked on "send" or "cancel". Is there any possibility to check this? Cause if the user doesn't send it I don't want that he comes in my app. regards

Upvotes: 0

Views: 246

Answers (1)

Anton
Anton

Reputation: 2847

If you use default MFMailComposeViewController try to check '(MFMailComposeResult)result' in:

// Then implement the delegate method
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
    [self dismissModalViewControllerAnimated:YES];
}




enum MFMailComposeResult {

   MFMailComposeResultCancelled,

   MFMailComposeResultSaved,

   MFMailComposeResultSent,

   MFMailComposeResultFailed

};
typedef enum MFMailComposeResult MFMailComposeResult;

Upvotes: 2

Related Questions