iOS 监听textfield的输入(转)

1:首先

  1. [textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];  


2:其次

    1. -(void)textFieldDidChange :(UITextField *)theTextField{  
    2.     NSLog( @"text changed: %@", theTextField.text);  
    3. }  
原文地址:https://www.cnblogs.com/mafeng/p/5880451.html