如何在iOS Swift中更改占位符字体样式,文本字段的颜色?

时间:2018-07-23 12:56:22

标签: swift uitextfield nsattributedstring placeholder

我必须为textfield占位符添加字体样式,颜色。并自定义边框和高度之外的文本字段。我尝试过nsAttributedString,但没有用。

new_Password.attributedPlaceholder = NSAttributedString(string: " Current Password", attributes: [NSForegroundColorAttributeName : UIColor.white]) // new_Password : our text feild name

0 个答案:

没有答案
相关问题