Open siggb opened 9 years ago
Here code for attributed placeholder support:
override var attributedPlaceholder: NSAttributedString! { didSet { floatingLabel.text = attributedPlaceholder.string floatingLabel.sizeToFit() setFloatingLabelOverlapTextField() } }
I also wrote wrapped method for setting attributed placeholder:
func setAttributedPlaceholder(text : NSString) { var attrs = [NSFontAttributeName : self.font, NSForegroundColorAttributeName : UIColor.grayColor()] var str = NSAttributedString(string: text, attributes: attrs) self.attributedPlaceholder = str }
Here code for attributed placeholder support:
I also wrote wrapped method for setting attributed placeholder: