Skyscanner / SkyFloatingLabelTextField

A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.
Apache License 2.0
4.09k stars 540 forks source link

Need to change floating label text field placeholder case to lower / capitalized #317

Closed hassan31 closed 3 years ago

hassan31 commented 4 years ago

ℹ Please fill out this template when filing an issue. All lines beginning with an ℹ symbol instruct you with what info we expect. Please remove this line and all above before submitting.

Before you start, are you using the latest SkyFloatingLabelTextField release?

Issues are for feature requests, and bugs; questions should go to Stack Overflow with the tag skyfloatinglabeltextfield.

Report

What did you do?

ℹ I'm trying to set the floating placeholder case to lower/capitalized with even attributed placeholder. I'm wondering if it is possible to change the case of floating placeholder text.

What did you expect to happen?

ℹ It should change the case of floating placeholder.

What happened instead?

ℹ All the letters are in upper case of floating label placeholder.

Environment

ℹ All environments

Xcode Version: SkyFloatingLabelTextField Version: Deployment Target: Base SDK: Method of Integration: CocoaPods | Carthage | Manual

Project that demonstrates the issue

ℹ Please see attached screen, it has upper case letters all the way for all floating text fields. IMG_2554

mluisbrown commented 4 years ago

You need to set titleFormatter. The default implementation makes the title uppercase. If you want the title to remain unchanged when it floats up from the placeholder, you can do:

skyTextField.titleFormatter = { $0 }