I have a textField in an alert. I've configured its borderStyle like that:
textField.borderStyle = .roundedRect
But there's still another rect border around the first one as you can see:
I'd like to remove it by code but I don't find any options or what to do it.
Here is the alert code:
private func presentUsernameAlert() {
let alert = UIAlertController(title: nil, message: "Alors ?", preferredStyle: .alert)
alert.addTextField(configurationHandler: newUsername)
alert.addAction(UIAlertAction(title: "Annuler", style: .default, handler: nil))
alert.addAction(UIAlertAction(title: "Confirmer", style: .default, handler: nil))
present(alert, animated: true, completion: nil)
}
private func newUsername(textField: UITextField) {
usernameTextField = textField
usernameTextField?.borderStyle = .roundedRect
usernameTextField?.keyboardAppearance = .dark
usernameTextField?.placeholder = "Nouveau pseudo"
}
then I call presentUsernameAlert()