I'm looking to randomize the output from a plist file. I've read about arc4random(), but I'm not sure how to incorporate it into the code.
thanks for any help.
here's the code that's currently pulling 'objectAtIndex:0'
-(IBAction) buttonPress {
NSString *path = [[NSBundle mainBundle] pathForResource:@"messages" ofType:@"plist"];
NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:path];
[myMessage setText:[array objectAtIndex:0]];
NSLog(@"%@",array);
}