I have tried many different things now, and nothing really works for me
First i want to pick a random question out of a lot (100+)
I have tried with some arc4random(), but not really works
Code:
questionNumber = questionNumber + 1;
I dont know how hard it would be to make it remember that question that have been asked (guess that is pretty hard)
Second i want to be able to restart the game, and this [self loadView] doesn't really help.
when i try this:
Code:
- (IBAction)buttonOne
{
if(questionNumber == 0){
// This means that we are at the startup-state
// We need to make the other buttons visible, and start the game.
[answerTwo setHidden:NO];
[answerThree setHidden:NO];
[answerFour setHidden:NO];
[self askQuestion];
}
else
{
NSInteger theAnswerValue = 1;
[self checkAnswer:(int)theAnswerValue];
if(restartGame==YES)
{
NSLog(@"meh");
//RESTART Function here
}
}
}
I get the log "meh" as a answer the last question and not when i press the restart button, very odd.
Hope someone can help, since this is a great tutorial, but needs the last method (restart please).
-Drudoo