I am having trouble fixing this error message down by the CGRect.minX/Y and CGRect.MaxX/Y. "Instance member 'minX' cannot be used on type 'CGRect" is the error. What could I do to fix it?
func spawnNewDisc(){
var randomImageNumber = arc4random()%4
randomImageNumber += 1
let CheeseBlock = SKSpriteNode(imageNamed: "CheeseBlock\(randomImageNumber)")
CheeseBlock.zPosition = 2
CheeseBlock.name = "CheeseObject"
let randomX = random(min: CGRect.minX(gameArea) + CheeseBlock.size.width/2,
max: CGRect.maxX(gameArea) - CheeseBlock.size.width/2)
let randomY = random(min: CGRect.minY(gameArea) + CheeseBlock.size.height/2,
max: CGRect.maxY(gameArea) - CheeseBlock.size.height/2)
CheeseBlock.position = CGPoint(x: randomX, y: randomY)
self.addChild(CheeseBlock)
}