Project2-GameplayKit, layer

2016-09-26  本文已影响0人  终极解码者

1.利用GameplayKit来为随机数组中的内容

countries = GKRandomSource.sharedRandom().arrayByShufflingObjects(in: countries) as! [String]

2.利用GameplayKit产生随机数

correctAnswer = GKRandomSource.sharedRandom().nextInt(upperBound: 3)

3.利用layer给控件加边框

button3.layer.borderWidth = 3
button1.layer.borderColor = UIColor.lightGray.cgColor
上一篇下一篇

猜你喜欢

热点阅读