I have a UIButton and a UITextField,when the button is pressed the textfield\'s content string will be equal to: This is a test string
Maybe simple key-value observing will work?
[textField addObserver:self forKeyPath:@"text" options:0 context:nil];
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if([keyPath isEqualToString:@"text"] && object == textField) {
// text has changed
}
}
Edit: I just checked it, and it works for me.