Switch in UIAlert Controller programmatically
<p>I am creating an registration dialog in swift with 3 text field and one Switch and I successfully add three text field two the Alert. The following code shows the same. </p>

<pre><code> let alertController = UIAlertController(title: "Register", message: "", preferredStyle: .Alert)
    let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (action) in
        // ...

        exit(0)
    }
    alertController.addAction(cancelAction)

    let OKAction = UIAlertAction(title: "Sign UP", style: .Default) { (action) in
        // ...
        let name0 = alertController.textFields![0] as UITextField
        print("Text field: \(name0.text)")

        let email1 = alertController.textFields![1] as UITextField
        print("Text field: \(email1.text)")

        let company2 = alertController.textFields![2] as UITextField
        print("Text field: \(company2.text)")


    }

    alertController.addAction(OKAction)

    alertController.addTextFieldWithConfigurationHandler { (textField) in
        textField.placeholder = "Name"
        textField.keyboardType = .EmailAddress
    }

    alertController.addTextFieldWithConfigurationHandler { (textField) in
        textField.placeholder = "Email"
        textField.secureTextEntry = false
    }

    alertController.addTextFieldWithConfigurationHandler { (textField) in
        textField.placeholder = "Company"
        textField.secureTextEntry = false
    }


            self.presentViewController(alertController, animated: true) {
                // ...
            }
</code></pre>

<p>Now I need to add a switch programmatically to the Alert View.We are doing this in Swift2. Is it possible?, i am new to Swift.</p>