FloatLabelFields
FloatLabelFields copied to clipboard
placeHolder color
Hi, everything works like a charm. Except that I cant change my placeholder text as I usually do.
override var placeholder: String? {
willSet(value) {
super.attributedPlaceholder = NSAttributedString(string: value!, attributes: [NSForegroundColorAttributeName : UIColor.whiteColor(), NSFontAttributeName : self.font])
}
}
Any ideas?
@hugocarlmartin This seems to work. then you can set it in the story board
@IBInspectable var placeholderTextColour:UIColor = UIColor.grayColor() {
didSet{
if placeholder != nil
{
self.attributedPlaceholder = NSAttributedString(string: placeholder!, attributes: [NSForegroundColorAttributeName:placeholderTextColour])
}
}
}