title: iOS: UIBezierPath and CAShapeLayer fillRule
body: <p>I have used  both <code>UIBezierPath</code> and <code>CAShapeLayer</code> before. But almost every time in conjunction with filling the object contained within the path with color inside. But I would like this time to fill the color outside of the object contained by the <code>UIBezierPath</code>.</p>
  <p>I just wrote and ran the following simple code trying to get myself acquainted with the <code>fillRule</code> property:</p>
  <pre><code>CAShapeLayer *myLayer = (CAShapeLayer *) self.layer; //size: 320 X 480
  UIBezierPath *testPath = [UIBezierPath bezierPathWithOvalInRect:(CGRect){{100, 100}, 100, 100}]; //a simple circle
  myLayer.fillRule = kCAFillRuleNonZero; // have tried this as well: kCAFillRuleEvenOdd;
  myLayer.path = testPath.CGPath;
  myLayer.fillColor = [UIColor whiteColor].CGColor;
  </code></pre>
  <p>But the color is filled nonetheless inside. What I would like to find out is, how can I fill the color outside of the path? If I am using <code>fillRule</code> wrong here, I would like to know if there is other methods that can achieve this. Thanks in advance.</p>