Reputation: 4824
How to hide the placeholder of TextField
programmatically using Swift 3x ?
Upvotes: 0
Views: 1486
Reputation: 72410
You can not hide the placeholder
of UITextField
, but you can set it to empty String.
self.textField.placeholder = ""
Now textField
doesn't show any placeholder
later on if you want to show the placeholder
simply set it with String that you want.
self.textField.placeholder = "Enter name"
Upvotes: 2