Possible Duplicate:
iphone - nsarray/nsmutablearray - re-arrange in random order
I have an NSMutableArray that contains 20 objects. Is there any way that I could randomize their order like when you shuffle a deck. (By order I mean their index in the array)
Like if I had an array that contained:
- apple
- orange
- pear
- banana
How could I randomize the order so that I could get something like:
- orange
- apple
- banana
- pear