nghialv / MaterialKit

Material design components for iOS written in Swift
MIT License
2.51k stars 290 forks source link

MKTextField floating placeholder doesn't work with `attributedPlaceholder` #37

Open robinmonjo opened 9 years ago

robinmonjo commented 9 years ago

When setting up the placeholder this way:

var str = NSMutableAttributedString(string: "some strings", attributes: nil)
str.addAttribute(NSForegroundColorAttributeName, value: UIColor.redColor(), range: NSMakeRange(0, str.length))
textField.attributedPlaceHolder = str

the floating placeholder is not visible.