I set maxlength to my textField, when I entered maximum characters in the textField the backspace is not working. Due to that I am unable to change the textFields content. This happens when I test my application on iPhone sdk 3.0 but it works properly in iPhone sdk 2.2.
Here is my code,
- (BOOL)textField:(UITextField *)txtField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if (txtField.text.length >= 15 && range.length == 0)
{
return NO;
}
else
{
return YES;
}
}
why it happens in iPhone sdk 3.0?