到处查了也没有找到答案。
这个方法是用在viewDidLoad()里面的。
我看的那本书里只说用这个方法“we called the arc4random_stir() function to seed the random number generator so
that we don’t get the same sequence of random numbers every time we run the application.”
英文都看懂了,就是无法理解。
难道不用这个方法,就会get the same sequence of random numbers every time we run the application?
PS :在这个class的定义下面,还有一个自己定义的method,里面用
到了arc4random_uniform()这个方法来生成随机数。不知道跟arc4random_stir()有没有什么关联。
PPS:我还查了文档 相关内容少的可怜,而且根本看不懂,附上:
stir: 搅动。
感觉是要做一下混淆之类的操作,以使「随机」这件事更「随机」。