问题
How to hide the placeholder of TextField
programmatically using Swift 3x ?
回答1:
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"
来源:https://stackoverflow.com/questions/41421850/hide-placeholder-programatically-using-swift-3x