I use arc4random in my project. Everything is fine with the functionality.
I want to add some more functionality, like a previous/back button with the arc4random function. I get my string out of an PLIST file and use it with the arc4random. When I touch the screen some random text will appear. I want to include an previous/back button so I can get the text (previous way) that was shown.
Anyone with an idea? Thanks a lot!
Edited: With some code:
NSString *pathToQuestions = [[NSBundle mainBundle] pathForResource:@"Bee" ofType:@"plist"];
NSMutableArray *questions = [[[NSMutableArray alloc] initWithContentsOfFile:pathToQuestions] autorelease];
int questionIndex = arc4random() %[questions count];
NSDictionary *question = [questions objectAtIndex:questionIndex];
NSString *name = [question objectForKey:@"name"];
NSString *sub = [question objectForKey:@"sub"];
nameslbl.text = name;
subslbl.text = sub;