第一种方法:
self.userNumber.setValue(UIColor.lightGray, forKey: "_placeholderLabel.textColor") self.userNumber.setValue(UIFont.systemFont(ofSize: 15), forKeyPath: "_placeholderLabel.font")
第二种方法:
//字体大小 textField.attributedPlaceholder = NSAttributedString.init(string:"输入你需要的服务", attributes: [NSFontAttributeName:UIFont.systemFont(ofSize:15)]) //字体颜色 textField.attributedPlaceholder = NSAttributedString.init(string:"输入你需要的服务", attributes: [ NSForegroundColorAttributeName:UIColor.red])
如对本文有疑问, 点击进行留言回复!!
APP调用微信小程序,能拉起小程序,但是onResp回调不会被调用问题
Codeforces Round #657 (Div. 2) B. Dubious Cyrpto(思维,数学)
网友评论