title: Cannot call value of non-function type "UIViewController?"
body: <p>I want to make an alert dialog showing up with messages and here's my code in ViewController.swift:</p>
  
  <pre><code>func showErrorAlert(title: String , msg: String){
      let alert = UIAlertController(title: title, message: msg, preferredStyle: .Alert)
      let action = UIAlertAction(title: "OK", style: .Default, handler: nil)
      alert.addAction(action)
      presentedViewController(alert, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>The last line is giving me an error:</p>
  
  <blockquote>
    <p>"Cannot call value of non-function type "UIViewController?""</p>
  </blockquote>