alertView is now alertController
<p>I'm trying to finish off my login page in iOS and it says "value of type 'UIAlertController' has no member 'show'" after I have changed alertView to alertController.</p>

<p>My code is:</p>

<pre><code>if ( username.isEqualToString("") || password.isEqualToString("") ) {

        var alertView:UIAlertController = UIAlertController()
        alertView.title = "Sign Up Failed!"
        alertView.message = "Please enter Username and Password"
        alertView.delegate = self
        alertView.addButtonWithTitle("OK")
        alertView.show()
    } else if ( !password.isEqual(confirm_password) ) {

        var alertView:UIAlertController = UIAlertController()
        alertView.title = "Sign Up Failed!"
        alertView.message = "Passwords doesn't Match"
        alertView.delegate = self
        alertView.addButtonWithTitle("OK")
        alertView.show()
    } else {
</code></pre>

<p>And I get the errors:</p>

<blockquote>
  <p>'UIAlertController' has no member 'show'" and "Value of type 'UIAlertController' has no member 'delegate'", etc. </p>
</blockquote>

<p>Furthermore, since I changed it to alertController this section of code has also got errors:</p>

<pre><code>var urlData: NSData? = NSURLConnection.sendSynchronousRequest(request, returningResponse:&amp;response, error:reponseError)

    if ( urlData != nil ) {
        let res = response as! NSHTTPURLResponse!;

        NSLog("Response code: %ld", res.statusCode);

        if (res.statusCode &gt;= 200 &amp;&amp; res.statusCode &lt; 300)
        {
            var responseData:NSString  = NSString(data:urlData!, encoding:NSUTF8StringEncoding)!

            NSLog("Response ==&gt; %@", responseData);

            var error: NSError?

            let jsonData:NSDictionary = NSJSONSerialization.JSONObjectWithData(urlData!, options:NSJSONReadingOptions.MutableContainers , error: &amp;error) as! NSDictionary
</code></pre>

<p>Stating "Extra argument 'error' in call" but if I take the error out, then it just gives me a different error, wanting me to take the ) away and add a , continuously!</p>

<p>Thank you!</p>