-3
可能性の重複:
What's the Best Way to Shuffle an NSMutableArray?ランダムに配列の値を表示する方法
私は5つの値1,2が含まれているarray.That 1を持っていることを1 application.Inを開発IAM、 3,4,5.ANd私はその値をランダムに表示したい。たとえば、最初に表示する3 2 4 5 1.And second time 1 3 2 4 5.これを変更するたびにこのようにする。この方法を教えてください。
重複:http://stackoverflow.com/questions/7047085/reading-random-from-an-array、http://stackoverflow.com/questions/56648/whats-the-best-way-to -shuffle-an-nsmutablearray、http://stackoverflow.com/questions/4202102/iphone-nsarray-nsmutablearray-re-arrange-in-random-order – Sarah
検索を習得してください。 "random nsarray"を簡単に検索すると、多くの結果が得られます。 –
rand()、random()、またはarc4random()関数を使用してください – Hiren