答案 0 :(得分:5)
制作自定义视图并将其添加为
textField.rightViewMode = .always
// Set rightview mode
var rightImageView = UIImageView(image: UIImage(named: "image_icon"))
textField.rightView = rightImageView// Set right view as image view }
// textField它是你的textfield对象,用你自己的
来改变它试试这个