首页 > swift2.1如何生成随机整数?
swift1时代可以用arc4radom方法返回随机整数,请问在swift2中如何实现呢?
var temp = Int(arc4random() % 100) + 1
包括1-100的随机数
参考链接