title: Coding SpriteKit game and I am receiving "Instance member 'minX' cannot be used on type 'CGRect"
body: <p>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?</p>
  
  <pre><code>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)
  
  }
  </code></pre>