MFMessageComposeViewController cancel button not working

前端 未结 6 494
慢半拍i
慢半拍i 2021-01-17 10:42

I use this block to send message to the contacts, after sending, the back button is there, but when I touch it nothing happens. Please help me out :)

-(IBAct         


        
6条回答
  •  无人共我
    2021-01-17 11:25

    Here's the answer for Swift 4, iOS 11

    case MFMailComposeResult.cancelled:
                print("Mail cancelled");
                break;
            case MFMailComposeResult.saved:
                print("Mail saved");
                break;
            case MFMailComposeResult.sent:
                print("Mail sent");
                break;
            case MFMailComposeResult.failed:
                print("Mail sent failure: %@", error?.localizedDescription);
                break;
            default:
                break;
            }
    

提交回复
热议问题