Hi,
I've tried to ask a couple questions before as I am struggling figuring out how to return to current view when app terminates being new. I guess I was hoping someone could help me with this idea since i am new, and hopefully I can work it somehow.
The question: I have multiple View Controllers as I am making a trivia game, so each xib file has its own question. So when the app terminates, can someone help me figure out how to save an integer depending on which View Controller is showing when app terminates?
So when question4ViewController is in view I want to put something like :
int save; // in the questionViewController.h file //
save = 4; // in the questionViewController.m file //
So when the app terminates, save has all ready been updated depending on which question is showing.
So then if I can figure that part out, when the app launches, I have a main page where the user can click new game, or continue therefore returning to the question the user was on when the app terminated. The plan there would be to somehow do -(IBAction)Continue{
if save = 3 it will go to question3ViewController
if save = 4 it will go to question4ViewController
and so on....
I assume there is a much easier way like a NSARRAY to do this, since other wise I have to to the if save = 100 times if I have a 100 questions. Any help is much appreciated.
I've tried to ask a couple questions before as I am struggling figuring out how to return to current view when app terminates being new. I guess I was hoping someone could help me with this idea since i am new, and hopefully I can work it somehow.
The question: I have multiple View Controllers as I am making a trivia game, so each xib file has its own question. So when the app terminates, can someone help me figure out how to save an integer depending on which View Controller is showing when app terminates?
So when question4ViewController is in view I want to put something like :
int save; // in the questionViewController.h file //
save = 4; // in the questionViewController.m file //
So when the app terminates, save has all ready been updated depending on which question is showing.
So then if I can figure that part out, when the app launches, I have a main page where the user can click new game, or continue therefore returning to the question the user was on when the app terminated. The plan there would be to somehow do -(IBAction)Continue{
if save = 3 it will go to question3ViewController
if save = 4 it will go to question4ViewController
and so on....
I assume there is a much easier way like a NSARRAY to do this, since other wise I have to to the if save = 100 times if I have a 100 questions. Any help is much appreciated.