Invalid timer using invalidate method in your updateLevel: method and redistribute the same timer.
[tmLevel invalidate]
tmLevel = [NSTimer scheduledTimerWithTimeInterval:20.0f target:self selector:@selector(updateLevel:) userInfo:nil repeats:YES];
And if you want to call the updateTimeLeft method: you don’t need to allocate another timer, this is a big leak, since you never release these links.
tmLeftTime = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(updateLeftTime:) userInfo:nil repeats:YES];
And in your updateTimeLeft: just redistribute the timer method and set the condition under which it should stop.
tmLeftTime = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(updateLeftTime:) userInfo:nil repeats:YES];
source
share