In my code I have:
-(BOOL)textFieldShouldReturn:(UITextField*)theTextField{
if (theTextField == ITload)
{
[ITload resignFirstResponder];
return YES;
}
if (theTextField == FacilitiesLoad) {
[FacilitiesLoad resignFirstResponder];
return YES;
}
return NO;
}
ITload and FacilitiesLoad are both my text fields. I’m using Numerical with punctuation keyboard and no done key appears. I have a return key which doesnt close the keyboard down.
Any ideas on how to display a done key and to get textFieldShouldReturn working please?
It seems that you haven’t set the delegate of your text fields to your receiver.
EDIT: you’re getting warnings because your view controller doesn’t (formally) comforms to the UITextFieldDelegate protocol. Declare it like this:
etc.