UIKit 1. arc4random_uniform(x) 随机数函数arc4random_uniform(x),可以用来产生0~(x-1)范围内的随机数。如果要生成1~x的随机数,可以这么写:arc4random_uniform(x)+1。