title: UIBezierPath and gradient iOS
body: <p>I have path with values and I want to make this gradient.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    CGContextRef context = UIGraphicsGetCurrentContext();
  
      CGContextSetStrokeColorWithColor(context, [[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:171.0/255.0 alpha:0.6] CGColor]);
      CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:171.0/255.0 alpha:0.6] CGColor]);
  
  
  
      UIBezierPath *aPath = [UIBezierPath bezierPath];
      [aPath moveToPoint:CGPointMake(30.0, 100.0)];
  
  
      [aPath addLineToPoint:CGPointMake(200.0, 120.0)];
      [aPath addLineToPoint:CGPointMake(300, 210)];
      [aPath addLineToPoint:CGPointMake(300, 420)];
      [aPath addLineToPoint:CGPointMake(30, 420.0)];
      [aPath addLineToPoint:CGPointMake(30, 100.0)];
  
      [aPath closePath];
      [aPath fill];
  </code></pre>
  
  <p>Any pointers to figure out issue with this code?</p>