I\'m using NSArray/NSMutable array to store different objects. Once all the objects are added, I want to re-arrange them in random order. How can I do it?
// the Knuth shuffle for (NSInteger i = array.count-1; i > 0; i--) { [array exchangeObjectAtIndex:i withObjectAtIndex:arc4random_uniform(i+1)]; }