title: MFMailComposeViewController in Swift
body: <p>This is sample code:</p>
  
  <pre><code>import UIKit
  import MessageUI
  
  class ViewController: UIViewController, MFMailComposeViewControllerDelegate {
  
      @IBAction func showEmail(sender : AnyObject) {
          var emailTitle = "Test Email"
          var messageBody = "This is a test email body"
          var toRecipents = ["a.nakhimov@gmail.com"]
          var mc: MFMailComposeViewController = MFMailComposeViewController()
          mc.mailComposeDelegate = self
          mc.setSubject(emailTitle)
          mc.setMessageBody(messageBody, isHTML: false)
          mc.setToRecipients(toRecipents)
  
          self.presentViewController(mc, animated: true, completion: nil)
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      func mailComposeController(controller:MFMailComposeViewController, didFinishWithResult result:MFMailComposeResult, error:NSError) {
          switch result {
          case MFMailComposeResultCancelled:
              NSLog("Mail cancelled")
          case MFMailComposeResultSaved:
              NSLog("Mail saved")
          case MFMailComposeResultSent:
              NSLog("Mail sent")
          case MFMailComposeResultFailed:
              NSLog("Mail sent failure: %@", [error.localizedDescription])
          default:
              break
          }
          self.dismissViewControllerAnimated(false, completion: nil)
      }
  }
  </code></pre>
  
  <p>In function mailComposeController I get an error on every <strong><em>case</em></strong> expression:</p>
  
  <p><strong>Could not find an overload '~=' that accepts the supplied arguments.</strong> </p>
  
  <p>What am I doing wrong?</p>