Q: Why does this position always return the same X value? I am using the following code to try to creating a CGPoint for a ball along the top of the screen: 
func randomBallPosition() -> CGPoint {
    let random = CGFloat((arc4random_uniform(8) + 1) / 10)
    let randomX = CGFloat(self.frame.size.width * random)
    let staticY = CGFloat(self.frame.size.height * 0.95)

    return CGPoint(x: randomX, y: staticY)
}

However the ball is always placed at (0,y) and I'm unsure why.

A: You just need to divide by 10 after converting your integer to CGFloat:
let random = CGFloat((arc4random_uniform(8) + 1)) / 10

