I converted my application to swift 3.0 and have a problem with MailComposeController . When I call the function:
`func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?){ controller.dismiss(animated: true, completion: nil) }`
First of all, I have an error with the information: 
which is strange for me because I copy and paste this method from MFMailComposeViewControllerDelegate . When I change Error to NSError , it works, but I get a warning with information, this method must be private to avoid this warning.
When I am in mailComposer and see the email and try to click Cancel , this controller will not disappear. Any solution how to reject this controller?
source share