I have a UITextField named textFieldInput and some button. Somehow I disable the input view so that if anyone tap in the texField no keyboard will show. I am adding text when a button is pressed programmatically. And I want to catch this changes. I want to call a function when the text of textField will change. How Can I do that?

I tried by adding following function

```
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)replacementStr {
// some my code
return YES;
}

```

But this does not work. this only calls when i tap on the textField.

I also tried by adding following in my viewDidLoad function

```
[textFieldInput addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];

```

this also doesn't work.

How can I do this?

Thanks.