title: BezierPath in Swift Using Playgrounds
body: <p>Do I have to create a custom class in order to use the BezierPath in the Swift playgrounds? </p>
  
  <p>The following code displays nothing but black background: </p>
  
  <pre><code>import UIKit
  import XCPlayground
  
  class GraphView : UIView {
  
      override func drawRect(rect: CGRect) {
  
          let path = UIBezierPath(rect: rect)
          path.moveToPoint(CGPointMake(0,0))
          path.addLineToPoint(CGPointMake(50,100))
          path.closePath()
          UIColor.redColor().setFill()
  
          path.stroke()
      }
  
  }
  
  
  let graphView = GraphView(frame: CGRectMake(0,0,960,640))
  </code></pre>