标签: swift arc4random
what's wrong? How I can generate words or string with arc4random?? Thank you for the help
答案 0 :(得分:-1)
您必须将arc4random的结果限制为数组的长度。
array1[Int(arc4random_uniform(UInt32(array1.count)))]