I am trying to achieve a transparency path in the drawRect method. This is the simple code I have created:

```
override func drawRect(rect: CGRect) {
    let clippingPath = UIBezierPath()

    UIColor.whiteColor().set();
    clippingPath.moveToPoint(CGPoint(x: 10, y: CGRectGetHeight(self.bounds) / 2))
    clippingPath.addLineToPoint(CGPoint(x: CGRectGetWidth(self.bounds) - 10, y: CGRectGetHeight(self.bounds) / 2))
    clippingPath.lineWidth = 6
    clippingPath.lineCapStyle = .Round
    clippingPath.stroke()
}

```

And this is the result:

[![enter image description here](https://i.stack.imgur.com/2vEgN.png)](https://i.stack.imgur.com/2vEgN.png)

Is there a way of trying to keep the background solid but the path line transparent. If I change the second line to `UIColor.clearColor().set()` nothing seems to happen, I just get a full solid background colour (in this case black.