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

Adding a background colour to titleLabel is creating a shadow on top and right side #311

Open madhukiranraju opened 4 years ago

madhukiranraju commented 4 years ago

Hi ,

I am using Xcode 11.3 and build a sample for 13.3 simulator and iPhone. I found a problem when adding the background colour to the self.titleLabel to white, the titleLabel is creating a shadow in the right and on top.


 override open func layoutSubviews() {
        super.layoutSubviews()

        self.titleLabel.backgroundColor = UIColor.white

        titleLabel.frame = titleLabelRectForBounds(bounds, editing: isTitleVisible() || _renderingInInterfaceBuilder)
        errorLabel.frame = errorLabelRectForBounds(bounds, editing: isErrorVisible() || _renderingInInterfaceBuilder)
        lineView.frame = lineViewRectForBounds(bounds, editing: editingOrSelected || _renderingInInterfaceBuilder)
    }

Please let me know any solution for this

Thanks, Madhu Simulator Screen Shot - iPhone 11 Pro - 2020-03-05 at 15 18 26