 
     override public var placeholder: String? {
         didSet {
-            floatingLabel.text = placeholder
-            floatingLabel.sizeToFit()
-            setFloatingLabelOverlapTextField()
+            self.setFloatingLabelTextToPlaceholderText()
         }
     }
     override public var bounds: CGRect {

    private func hideFloatingLabel() {
        floatingLabel.alpha = 0.0
    }
}

        floatingLabel = UILabel()
        floatingLabel.font = floatingLabelFont
        floatingLabel.alpha = 0.0
        self.setFloatingLabelTextToPlaceholderText()
        addSubview(floatingLabel)
    }

