What's the Best Way to Shuffle an NSMutableArray?

Posted by Kristopher Johnson on Stack Overflow See other posts from Stack Overflow or by Kristopher Johnson
Published on 2008-09-11T14:16:43Z Indexed on 2010/03/12 6:07 UTC
Read the original article Hit count: 375

Filed under:
|
|

If you have an NSMutableArray, how do you shuffle the elements randomly?

(I have my own answer for this, which is posted below, but I'm new to Cocoa and I'm interested to know if there is a better way.)

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa