0

in order to recognize if a user jumps from editing one textField to another by just touching another one instead of hitting the return button i implemented a method which gets called with the event "Editing did end". i read this event also happens when, in this case a textField resignsFirstResponder.

Now whenever the user hase a multiple choice I present a modal View with a picker. I have the problem whenever there is a multiple choice and the user switches textFields without hitting return this method gets called twice and I don know why!

is it possible that the modalviewcontroller resigns all FirstResponder of the parentView when it gets presented ?

BObereder
  • 1,046
  • 1
  • 13
  • 29

1 Answers1

0

you can say

[myTextField1 resignFirstResponder];
[myTextField2 resignFirstResponder];
[myTextField3 resignFirstResponder];

before presenting your controller.

but i have a feeling there could be a better way to solve this if i can understand your problem clearly.

  • no this is no what I want! actually this is exactly what I do not want! cause my methode gets called I do something and it should not be called again unless the user typed something in the textField. if I call resignFirstResponder the method would be called again! – BObereder May 17 '11 at 17:45
  • For text fields you are presenting modal controller with picker, you should return NO in textFieldShouldBeginEditing: method. So for such text fields, no keyboard will pop up. –  May 18 '11 at 07:07
  • that is not my problem. I do need the keyboard. Just wanted to know if is it possible that the modalviewcontroller resigns all FirstResponder of the parentView when it gets presented ? – BObereder May 18 '11 at 16:07