title: How to prevent CALayer from drawing background color?
body: <p>I have a custom UIView in which I implement several convenient drawing methods, allowing me to set corner radius of specific corners, draw borders, and use gradients instead of a background color. I achieve this by overriding <code>drawRect(rect:CGRect)</code>. However, despite using <code>CGContextClip</code> to clip drawing to the CGPathRef I generate, the background color is always drawn to fill the view's bounds. That is because the view's layer draws before drawRect is called.</p>
  
  <p>Aside from overriding the setter for backgroundColor, are there any other ways to only draw what I am specifying in drawRect? I DO NOT want to mask the layer with a CAShapeLayer or something of the sort. It should still be possible to subclass and draw outside of the layer's bounds.</p>