我是靠谱客的博主 风中烤鸡,这篇文章主要介绍swift4.0 textfield 的placeholder 占位符的字体大小和颜色的设置方法,现在分享给大家,希望可以做个参考。

记录一下 swift4.1 textfield 的placeholder 占位符的字体大小和颜色的设置方法

let placeholserAttributes = [NSAttributedStringKey.foregroundColor : UIColor.blue,NSAttributedStringKey.font : UIFont.systemFont(ofSize: 16)]
passwordField.attributedPlaceholder = NSAttributedString(string: "输入密码",attributes: placeholserAttributes)

最后

以上就是风中烤鸡最近收集整理的关于swift4.0 textfield 的placeholder 占位符的字体大小和颜色的设置方法的全部内容,更多相关swift4.0内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(117)

评论列表共有 0 条评论

立即
投稿
返回
顶部