Swift - Using UIBezierPath in a Subview
<p>I'm trying to make a simple app. To do so, in part, I'm trying to use a subview to draw a circle on the screen.</p>

<p>This is my view controller class:</p>

<p>gameView is the view linked to in the the storyboard.
ballView is the view I would like to add in.</p>

<pre><code>class GameViewController: UIViewController {

     @IBOutlet var gameView: UIView!
     var ballView = GameBallView()

    override func viewDidLoad() {
        super.viewDidLoad()

        gameView.addSubview(ballView)
        ballView.setNeedsDisplay()
        gameView.setNeedsDisplay()
   }
}


class GameBallView: UIView {

    override func drawRect(rect: CGRect) {
        let rectForBall = CGRect(x: 50, y: 250, width: 20, height: 20)
        let path = UIBezierPath(ovalInRect: rectForBall)
        path.fill()
        path.stroke()
    }
}
</code></pre>

<p>drawRect is called, but for some reason nothing shows up on the screen. Does anyone know what I did wrong?</p>