Any idea why this chunk of code doesn't work?
Code:
-(IBAction)go{
mainTimer = [NSTimer timerWithTimeInterval:0.1 target:self selector:@selector(updateTime) userInfo:nil repeats:YES];
}
-(void)updateTime{
gameTime = gameTime-1;
if (gameTime <= 0) {
[mainTimer invalidate];
mainButton.hidden=YES;
stopLabel.hidden = NO;
}
timeLabel.text = [NSString stringWithFormat:@"Time : %d", gameTime];
}