I define a CGMutablePath() called path and a SKShapeNode() called rect :
var path = CGMutablePath()
var path = CGMutablePath()
Then I try and display the rectangle :
let rect = CGRect(x: 0, y: 0, width: self.size.width, height: self.size.height/2-36)
CGPathAddRect(path, nil, rect)
shapeNode.path = path
shapeNode.lineWidth = 0
shapeNode.fillColor = SKColor.black
shapeNode.zPosition = 1
self.addChild(shapeNode)
But I then get the following error :
Nil is not compatible with expected argument type 'UnsafePointer<CGAfineTransform>'
At the second line of the previous code :
CGPathAddRect(path, nil, rect)
It has only started giving me this error with the swift 3 update, what do I do?