版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_30963589/article/details/81324204
记录一下 swift4.1 textfield 的placeholder 占位符的字体大小和颜色的设置方法
let placeholserAttributes = [NSAttributedStringKey.foregroundColor : UIColor.blue,NSAttributedStringKey.font : UIFont.systemFont(ofSize: 16)]
passwordField.attributedPlaceholder = NSAttributedString(string: "输入密码",attributes: placeholserAttributes)