views:

35

answers:

1

Hey, I have created a textfield within two custom cells. One textfield shows the standard keyboard and the other the shows a pickerview when entered. The problem I have is when I move from the keyboard to pickerview textfield without clicking the "return" button on the keyboard, the keyboard doesn't resign. However when I do it using the "return" the keyboard resigns. Am using:

- (void)textFieldDidEndEditing:(UITextField *)myTextField{
 [myTextField resignFirstResponder];
}

and can't work out why this isn't working.

Thanks, William

+1  A: 

Does your view controller adopt <UITextFieldDelegate>? Is it hooked up as the delegate of your text fields?

Dan Ray
Thanks for the response. It does implement the delegate and it is hooked up because it enters the above "textFieldDidEndEditing" method.For some reason it just doesn't actually resign it when I move directly from one textfield to another without dismissing the keyboard using the "return" key.
wibo