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