Unable to display the placeholder above the text field
tciuro opened this issue · comments
Tito Ciuro commented
What did you do?
usernameTextField.placeholder = "Username"
usernameTextField.placeholderColor = .systemBlue
usernameTextField.infoTextColor = .systemGray2
usernameTextField.showInfo("Hello World!", animated: true)
usernameTextField.lineWidth = 1.0
usernameTextField.lineColor = .systemGray2
What happened instead?
I cannot find a way to place the placeholder above the text field (like the gif shown on the README file).
What did you expect?
To find an easier way to add the placeholder above the text field ;-)
Environment
- Library version: master
- Xcode version: 11.4
- Swift version: (if applicable, if not remove) Apple Swift version 5.2
- Platform running (iOS version): iOS
Demo Project
See snippet above.
Oleg commented
Hi @tciuro ,
Thanks for posting detailed issue :) I appreciate that.
I will take a look and return back to you with results.
Oleg commented
Hi there,
The problem that you are using placeholder
property. Use tweePlaceholder
instead.
It was done for few reasons:
- To not mix native functionality with custom one.
- To get better control over the placeholder text.
Wish it help. If you have any issues just reopen the issue.
Close for now.
Oleg commented
I updated README.
https://github.com/oleghnidets/TweeTextField/blob/master/README.md#usage