views:

12

answers:

1

I am trying to move my view when the user selects a text field so that the text field is still visible, which I have achieved. I am also using a control event to ensure that the text field is not empty before enabling a button.

Using

[longTextField addTarget:self action:@selector(updateAnswerButtonEnabled:) forControlEvents:UIControlEventEditingChanged];

- (void)textFieldDidBeginEditing:(UITextField *)textField {

and

- (void)textFieldDidEndEditing:(UITextField *)textField {

causes the keyboard to hide itself after every character input. Why is this and how should I get around it?

A: 

Having experimented, calling the method updateAnswerButtonEnabled from textFieldDidEndEditing has the desired response. However, I am interested to know what causes the strange behaviour with the first method I posted.

churchill614