i want to send the keypad back after writing in textfield.
+2
A:
Implement the - (BOOL)textFieldShouldReturn:(UITextField *)textField;
delegate method and tell the text field to resign it's first responder status.
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
Jasarien
2009-12-30 11:24:17
its not working.can u tell me how to put the done button in keypad
uttam
2009-12-30 11:31:05
You need to ensure that you set the delegate property of the text field to point to the instance of the class that you implemented the method in.Also, you can set the `returnKeyType` on the textField to `UIReturnKeyTypeDone`
Jasarien
2009-12-30 11:38:55
A:
- (IBAction)textFieldDoneEditing:(id)sender{
[sender resignFirstResponder];
}
connect this to didEndOnExit action of your textfield
Nithin
2009-12-30 11:32:29
A:
You need to set the delegate of the textfield to fileowner (using interface builder) first. then you implement the method:
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
it will work!
Roberto
2010-08-12 14:35:02