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

TextField title is automatically change to all uppercase #273

Closed ghost closed 5 years ago

ghost commented 5 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?

ℹ Please replace this with what you did.

I added placeholder and title as "UserName" after inputting text data, the title is showing as "USER NAME".

ℹ Please replace this with what you expected to happen.

How can use the original one without changing to Uppercase.

ℹ Please replace this with of what happened instead.

Environment

ℹ Please fill in this section with information about your environment

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

Project that demonstrates the issue

ℹ Please link to a project we can download that reproduces the issue if applicable.

alex02rt commented 5 years ago

I have same problem, this is my current solution. Hope it helps.

class CustomTextField: SkyFloatingLabelTextField {
    private var _titleFormatter: (String) -> String = { (text: String) -> String in
        return text
    }
    override var titleFormatter: ((String) -> String) {
        get {
            return _titleFormatter
        }
        set {

        }
    }
}
ghost commented 5 years ago

Opp! Great! it is working well. Thank you so much bro!