Did not work for me. Could you please help?
(Quiz game view controller.h):
-(void)checkAnswer

int)theAnswerValue;
-(void)askQuestion;
-(void)updateScore;
-(void)loadLevelOne;
-(void)countDown;
-(void)reset;
@end
Quiz game view controller.m file:
-(void)updateScore
{
questionLive = NO;
[timer invalidate];
[answerOne setHidden:YES];
[answerTwo setHidden:YES];
[answerThree setHidden:YES];
[answerFour setHidden:YES];
NSString *scoreUpdate = [[NSString alloc] initWithFormat:@"%i", myScore];
theScore.text = scoreUpdate;
[scoreUpdate release];
// END THE GAME.
NSInteger endOfQuiz = [theQuiz count];
if((((questionNumber - 1) * 6) + 6) == endOfQuiz)
{
if(myScore > 0)
{
NSString *finishingStatement = [[NSString alloc] initWithFormat:@"You scored %i!", myScore];
theQuestion.textColor = [UIColor colorWithRed:0 green:0.2 blue:0 alpha:1.0];
theQuestion.text = finishingStatement;
[finishingStatement release];
}
else
{
NSString *finishingStatement = [[NSString alloc] initWithFormat:@"You scored %i.", myScore];
theQuestion.textColor = [UIColor redColor];
theQuestion.text = finishingStatement;
[finishingStatement release];
}
theLives.text = @"";
restartGame = YES;
[answerTwo setHidden:NO];
[answerTwo setTitle:@"Restart" forState:UIControlStateNormal];
}
else
{
time = 3.0;
timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(countDown) userInfo:nil repeats:YES];
}
}
// RESET METHOD
-(void)reset {
[self viewDidLoad];
}