美文网首页
Project2-GameplayKit, layer

Project2-GameplayKit, layer

作者: 终极解码者 | 来源:发表于2016-09-26 11:17 被阅读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

相关文章

网友评论

      本文标题:Project2-GameplayKit, layer

      本文链接:https://www.haomeiwen.com/subject/sklqyttx.html