Open tobinharris opened 9 years ago
The main problem is that UIKit doesn't expose a color property for the placeholder text (see http://stackoverflow.com/questions/1340224/iphone-uitextfield-change-placeholder-text-color). You can however set an attributed string through textField.attributedPlaceholder
and set the foregroundColor
of that attributed string from a property that is set via Classy.
Let me know if that doesn't make sense and I can work up a quick example.
@keithnorm , I don't know if you're still monitoring Classy, but could you provide the example you mentioned for using attributedPlaceholder? I've been trying to work this out and haven't found the magic combination yet.
Anyone got an example of styling a
UITextField
with custom colours for placeholder and input text.Is achieved by this, but after editing the green text style reverts to that of the placeholder.