title: Can't dismiss MFMailComposeViewController in Swift 3.0
body: <p>The <code>MFMailComposeViewController</code> cannot be dismissed after pressing cancel or send button. I have added <code>MFMailComposeViewControllerDelegate</code> in my class but still, it's not working? </p>
  
  <p>Here is my code:</p>
  
  <pre><code>func sendEmail() {
      let MailVC = MFMailComposeViewController()
      MailVC.mailComposeDelegate = self
      MailVC.setToRecipients(["\(emailLabel?.text)"])
      MailVC.setSubject("Set your subject here!")
      MailVC.setMessageBody("Hello this is my message body!", isHTML: false)
      // Present the view controller modally.
      self.present(MailVC, animated: true, completion: nil)
  }
  
  func mailComposeController(controller: MFMailComposeViewController,
                             didFinishWithResult result: MFMailComposeResult, error: NSError?) {
      // Dismiss the mail compose view controller.
      controller.dismiss(animated: true, completion: nil)
  }
  </code></pre>