I would like to know how to randomly select an object within an NSMutableArray (one of the strings below) and make the contents of the randomly selected object to be the contents of a UITextView. Below is my code:
NSMutableArray *quotes = [[NSMutableArray alloc] initWithObjects:
@"Text 1",
@"Text 2",
@"Text 3",
@"Text 4",
@"Text 5",
@"Text 6",
@"Text 7",
@"Text 8",
@"Text 9",
@"Text 10",
nil];
textView.text = // And then I would like to know how to randomly select one of the objects within the quotes Array
Thank you in advanced!
You can use something like this: