How to check the character is backspace (delete)


- (BOOL) textField:(UITextField *) textField
shouldChangeCharactersInRange:(NSRange) range
            replacementString:(NSString *) string
{
     if ([string length])
     {
          if ([string characterAtIndex:0] == 10)
          {
               NSLog(@"keyboard backspace pressed");
          }
      }
      return YES;
}

Blogged with the Flock Browser
Advertisements