1
MFMailComposeViewController 클래스를 사용할 때 사용자가 실제로 보내기 단추를 누른 경우 확인 방법이 있습니까?MFMailComposeViewController 누름 여부 확인
감사
MFMailComposeViewController 클래스를 사용할 때 사용자가 실제로 보내기 단추를 누른 경우 확인 방법이 있습니까?MFMailComposeViewController 누름 여부 확인
감사
사용 MFMailComposeViewControllerDelegate (https://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMailComposeViewControllerDelegate_protocol/Reference/Reference.html)
-(void)sendMail
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
[mailer setMailComposeDelegate:self];
//do the rest of the mail composing
...
}
-(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
{
//don't forget to dismiss the controller
[controller dismissModalViewControllerAnimated:YES];
if(result == MFMailComposeResultSent)
{
//the user sent the mail
}
}