2017-01-16 27 views

回答

-1

您必須將arc4random的結果限制爲您的數組長度。

array1[Int(arc4random_uniform(UInt32(array1.count)))]