let imageview = UIImageView(image: UIImage(named: "contacts"))
imageview.isUserInteractionEnabled = true
// 手势添加, showContactsList
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(showGesture))
imageview.addGestureRecognizer(tapGesture)
textfield.leftView = imageview
textfield.leftViewMode = UITextFieldViewMode.unlessEditing
textfield.clearButtonMode = UITextFieldViewMode.whileEditing
func showGesture() {
}
网友评论