Project2-GameplayKit, layer

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

你可能感兴趣的:(Project2-GameplayKit, layer)