title: Custom control in swift looping infinitely in xcode playground
body: <p>I'm using XCode's playground feature to develop a custom control. However, I'm having issues using sub-routines (methods) to break up the drawRect implementation.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import UIKit
  
  class CustomView : UIView
  {
      override func drawRect(rect: CGRect) {
          var color = UIColor(red: 0.571, green: 0.857, blue: 1, alpha: 1);
          var ovalPath = UIBezierPath(ovalInRect: rect);
          color.setFill();
          ovalPath.fill();
          // if I uncomment this, the code runs in an infinite loop...
          // drawCircle(rect);
      }
  
      func drawCircle(rect: CGRect) {
          var color = UIColor(red: 0.571, green: 0.857, blue: 1, alpha: 1);
          var ovalPath = UIBezierPath(ovalInRect: rect);
          color.setFill();
          ovalPath.fill();
      }
  }
  
  var cv = CustomView(frame: CGRect(x: 0, y: 0, width: 400, height: 400));
  </code></pre>
  
  <p>If I uncomment the line noted above that calls the drawCircle function - the code hangs in an infinite loop. </p>
  
  <p>Why is this?</p>