textField实现左图右文字
作者:
嗯哼丶傻大个是你 | 来源:发表于
2017-01-16 17:35 被阅读0次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() {
}
本文标题:textField实现左图右文字
本文链接:https://www.haomeiwen.com/subject/zxepbttx.html
网友评论