views:

439

answers:

1
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
    [theTextField resignFirstResponder];
    return YES;
}

it is not working....

+2  A: 

This answer demonstrates that the delegate decides whether or not to dismiss the keypad.

If you want to dismiss the keypad, textFieldShouldReturn: must return NO:

-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
    [theTextField resignFirstResponder];
    return NO;
}
Frank Shearar