title: MFMailComposeViewControllerDelegate method not getting invoked after Swift 3.0 migration
body: <p>My app has email compose feature and it was working perfectly on Swift 2.2. Recently I migrated code to Swift 3.0 and stuck with this issue. Sharing my code snippet below:</p>
  
  <pre><code>import MessageUI
  
  class ViewController: UIViewController,     MFMailComposeViewControllerDelegate {
   func sendEmail() {
      if MFMailComposeViewController.canSendMail() {
        let mail = MFMailComposeViewController()
        mail.mailComposeDelegate = self
        mail.setToRecipients(["someone@somewhere.com"])
        mail.setSubject("Sending you an in-app e-mail...")
        mail.setMessageBody("&lt;p&gt;You're so awesome!&lt;/p&gt;", isHTML: true)
        self.present(mail, animated: true)
      } else {
          //  handle failure
      }
    }
  
   func mailComposeController(_ controller:    MFMailComposeViewController, didFinishWith result: MFMailComposeResult,  error: Error?) {
  
      controller.dismiss(animated: true)
    }
  
   @IBAction func mailClicked(_ sender: AnyObject) {    
      sendEmail()
    }
   }
  </code></pre>
  
  <p>I have set mailComposeDelegate to self, put _ in delegate method and tried all solutions found on search. But could not resolve the issue. </p>
  
  <p>Any help is greatly appreciated.</p>