1.利用GameplayKit來為隨機(jī)數(shù)組中的內(nèi)容
countries = GKRandomSource.sharedRandom().arrayByShufflingObjects(in: countries) as! [String]
2.利用GameplayKit產(chǎn)生隨機(jī)數(shù)
correctAnswer = GKRandomSource.sharedRandom().nextInt(upperBound: 3)
3.利用layer給控件加邊框
button3.layer.borderWidth = 3
button1.layer.borderColor = UIColor.lightGray.cgColor