[textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
-(void)textFieldDidChange :(UITextField *)theTextField{
NSLog(@"text changed: %@", theTextField.text);
}
[textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
-(void)textFieldDidChange :(UITextField *)theTextField{
NSLog(@"text changed: %@", theTextField.text);
}
本文标题:iOS 监听textfield的输入
本文链接:https://www.haomeiwen.com/subject/jhpvgxtx.html
网友评论