You could probably do this with a simple NSTimer. In shouldChangeCharactersInRange:
check if the timer is valid and if it is, invalidate it, then restart the timer. When the time is finally aloud to fire, it means that the user hasn't typed anything in the interval you specify for the time.
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if (someTimer.isValid) {
[someTimer invalidate];
}
someTimer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(timeToSearchForStuff:) userInfo:nil repeats:NO];
return YES;
}
As @Jai Govindani pointed out in order to implement this method, you'll need to assign your controller as the delegate of of your UITextField and make sure your controller conforms to the UITextFieldDelegate protocol.