Text boxes in a UIAlertViewController with a rounded rectangular style. (Swift)
I have no problem adding text fields to the UIAlertController, but I find these text fields to be disgusting. Does anyone know how to make them look more attractive?
My code for adding a textbox:
let pincodeAlert:UIAlertController = UIAlertController(title: alertTitle, message: "Enter your passcode", preferredStyle: UIAlertControllerStyle.Alert)
pincodeAlert.addTextFieldWithConfigurationHandler({ (pinCodeTextField:UITextField!) -> Void in
pinCodeTextField.placeholder = "Password"
pinCodeTextField.secureTextEntry = true
pincodeAlert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil}))
pincodeAlert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: { (action) -> Void in
//do some other stuff here...
}))
presentViewController(pincodeAlert, animated: true, completion: nil)
My current alert view text boxes are very square and it doesn't look good.
What I want:
What do I have:
+3
source to share
2 answers