#
IOS
2019-03-21
IOS开发笔记-TextField更改前端占位符颜色、禁止输入、背景色
//iosUI界面文字展示颜色
let placeholserAttributes = [NSAttributedString.Key.foregroundColor : UIColor.red,NSAttributedString.Key.font : UIFont.systemFont(ofSize: 17)]
dbstatus.attributedPlaceholder = NSAttributedString(string: "失败",attributes: placeholserAttributes)
//禁止输入
select_url.isEnabled = false
//背景色置灰
select_url.backgroundColor = UIColor.gray
TAGS:
无标签
相关推荐
- 暂无相关推荐,看看别的吧。
0 评论