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?
let count = self.arrayOfData.count
for (index, _) in self.arrayOfData.enumerated()
{
let nTempElement = count - index
let swapIndexwith = (Int(arc4random()) % nTempElement) + index
arrayOfData.swapAt(index, swapIndexwith)
}