- 监听文本框文字改变
[_textField addTarget:self action:@selector(text) forControlEvents:UIControlEventEditingChanged];
- 获取文本框的clearButton
UIButton *btn = [_textField valueForKey:@"_clearButton"];
[_textField addTarget:self action:@selector(text) forControlEvents:UIControlEventEditingChanged];
UIButton *btn = [_textField valueForKey:@"_clearButton"];
本文标题:UITextField
本文链接:https://www.haomeiwen.com/subject/ohygwqtx.html
网友评论