Possible Duplicate:
create random integers for quiz using plist
Using xcode, how do I randomly choose from my plist? I have created 84 questions in my plist and want to randomly choose 10 to create a quiz when user clicks button.
So far I have
NSString *plistFile = [[NSBundle mainBundle] pathForResource:@"global" ofType:@"plist"];
NSDictionary *dict = [NSDictionary dictionaryWithContentsofFile:plistFile];
NSLog(@"%@",[dict objectForKey:@"1"]);
NSLog(@"%@",[dict objectForKey:@"2"]);
NSLog(@"%@",[dict objectForKey:@"3"]);
Global is the plist name, @"1", @"2", etc are the names for each different question. This is my long way of creating a quiz with random questions.