Em, the solution here I found was NSTimer. By using that, I could set an auto-executed method which observing a count down value. Once that value count to zero, some actions could be trigged. If user continuously changed those tags, that count down value would be initialized repeatedly.
-(void)countDownTimer{
if(!timer){
timer = [NSTimer scheduledTimerWithTimeInterval:0.4f target:self selector:@selector(updateCounter:) userInfo:nil repeats:YES];
}
timeLeft=2;
}
- (void)updateCounter:(NSTimer *)theTimer {
if(timeLeft > 0 ){
timeLeft--;
NSLog(@"%d",timeLeft);
}
else{
//trigger update
//balabala
[timer invalidate];
timer = nil;
}
}