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

Decrease spacing between placeholder and text #291

Closed jasnicaa closed 4 years ago

jasnicaa commented 5 years ago

Hey thanks for a great library!

I am wondering how to decrease the spacing between placeholder and text?

fl034 commented 4 years ago

I had the same question and found a solution by subclassing:

class MySkyFloatingTextField: SkyFloatingLabelTextField {
    override func titleHeight() -> CGFloat {
        return super.titleHeight() - 4
    }
}

But the problem with this is that the text gets clipped a little

jasnicaa commented 4 years ago

yes my thoughts exactly but that clipping is a big problem, so I just left it that way although our designer is not happy :D

k0nserv commented 4 years ago

As @jasnicaa said subclassing is the suggested approach here, it's not likely that we'll accept any changes to support this