Returns an array whose contents are the same as those of the specified array, but in a random order determined by the random source.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
An array of objects.
An array whose contents have been randomly shuffled.
Use this method with an instance of
GKRandom (or of one of its subclasses) to randomly rearrange the contents of an array. For example, in a card game you might use this method to randomize an array of card objects.