you call the code to modify the fireDate inside the timerFired method. That's too early. The fireDate is the date when the timer DID fire there.. it isnt updated yet.
one easy fix: wrap it in a dispatch async. that lets the timer return and update its fireDate BEFORE you try to modify it:
fixed code:
- (void)timerMethod:(NSTimer *)timer {
static int variable = 1;
dispatch_async(dispatch_get_main_queue(), ^{
[self afterTimerFired:timer];
}
}
- (void)afterTimerFired:(NSTimer *)timer {
static int variable = 1;
switch (variable) {
case 4: // Stop for twice as long here
self.stopLightLabel.textColor = [UIColor greenColor];
...
NSTimeInterval timeBetweenNowAndFireDate = [timer.fireDate timeIntervalSinceNow];
NSLog(@"%f", timeBetweenNowAndFireDate);
// Create a new date that is twice as far in the future in order to give a long pause
timer.fireDate = [NSDate dateWithTimeIntervalSinceNow:(timeBetweenNowAndFireDate * 2)];
...
OR
dont dispatch async and make
fireDate = [NSDate dateWithTimeIntervalSinceNow:fire.timeInterval*2]
wich might be even cleaner if possible