I need to survey a textField’s value every time it’s changed. To handle this, I simply added that action to the .h file and implemented that method in the .m file. (That is, I “ctrl+click”ed the “Value Changed” event from the Storyboard and dragged it onto my .h file). Even if I just try to NSLog from the method, it’s not logging anything, whether the value of my textbox is changed or not.
My header file includes the following:
(IBAction)changed:(UITextField *)sender;
and my .m file has the following:
(IBAction)changed:(UITextField *)sender {
NSLog(@"%@", @"Changed");
}
Make one of your controllers the text field’s delegate and implement
textField:shouldChangeCharactersInRange:replacementString: