0

i created a UIAlertController and within the AlertController i added a UITextfield, and i want it without any kind of borders around. There is an image below with the borders, and i would like to delete that square border.

I would like to end up with a non-border TextField, and the only thing you could see is the text you are typing. Something like this:

Spidy
  • 1,137
  • 3
  • 28
  • 48
Roy RW
  • 21
  • 5

1 Answers1

0

On the part that u add the textfield, u can set its properties.

alert.addTextField { (textField) in
      textField.placeholder     = "Bla sheep"
      textField.borderStyle     = .none   //remove borders
      textField.backgroundColor = .clear  //transparent background
}
alegelos
  • 2,308
  • 17
  • 26