问题
I want to keep the placeholder static while typing. With the default behaviour of iOS as soon as we start typing in the UITextField
the placeholder disappears.Thanks in advance.
回答1:
I have Simple way for this .
Add UILabel
below UITextField
and set UITextField
clearColor .and set your UILabel
text as you required and set that text color same as placeholder color .
回答2:
You can't because it's not only in IOS but also all the textField have the same property starting from IOS to HTML. As soon as the value entered into textfield placeholder will be hide and vice versa. But if you really need to show the placeholder text after typing then @Darshan Kunjadiya's answer is simple and best.
来源:https://stackoverflow.com/questions/24523665/keep-the-placeholder-static-while-typing-in-uitextfield