clearButton 改色
class JJTextField: UITextField {
override func layoutSubviews() {
super.layoutSubviews()
for view in subviews {
if let button = view as? UIButton {
button.setImage(button.image(for: .normal)?.withRenderingMode(.alwaysTemplate), for: .normal)
button.tintColor = .white
}
}
}
}
占位符 改色
let JJTF = JJTextField()
JJTF.tintColor = UIColor.white
网友评论