didMoveToView()
在我的 SKScene 中调用此代码:
let frame = CGRect(x: 30, y: 200, width: 100, height: 100)
let path = UIBezierPath(rect: frame)
UIColor.blackColor().setStroke()
path.stroke()
self.addChild(SKShapeNode(path: path.CGPath))
绝对什么都不做。场景是空的(它具有默认的 SKScene 灰色背景)。这里我只是尝试绘制一个黑色的未填充矩形(这是使用SKShapeNode绘制路径的简化版本,原始有更复杂的绘制代码)。