Making a sprite appear at a random y point
<p>Im trying to create a sprite and give it a random y position, currently some of the sprites spawn out of view or are partly cut off. Which part do I have wrong(the screen is in landscape) and viewFrame is passed into the function and is the frame of the game scene</p>

<pre><code> let enemyShip = SKSpriteNode(imageNamed: "enemyShip")
        enemyShip.position = CGPointMake(viewFrame.maxX + enemyShip.size.height, CGFloat(arc4random_uniform(UInt32(viewFrame.maxY - enemyShip.size.height)) + UInt32(enemyShip.size.height)))
</code></pre>