I check my textfield like this:
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if ([subtitleField.text length] == 0)
{
searchAddress.hidden = NO;
}
else
{
searchAddress.hidden = YES;
}
return YES;
}
but it works only if I clear textfield by clear key, if I press clear button, it didn’t work.
Implement the
[UITextFieldDelegate textFieldShouldClear:]method as well: