title: Drawing a shape in a UIImageView IOS
body: <p>I am trying to draw some circles inside a UIImageView with a specific image. This is what I was trying to do:</p>
  
  <pre><code>UIGraphicsBeginImageContext(self.view.bounds.size);
  CGContextRef contextRef = UIGraphicsGetCurrentContext();
  CGContextSetLineWidth(contextRef, 2.0);
  CGContextSetStrokeColorWithColor(contextRef, [color CGColor]);
  CGRect circlePoint = (CGRectMake(coordsFinal.x, coordsFinal.y, 50.0, 50.0));
  
  CGContextStrokeEllipseInRect(contextRef, circlePoint);
  
  UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  
  [photoView addSubview:image];
  </code></pre>
  
  <p>The circle is drawn fine, but I would like the PhotoView to act as a mask to it. So if for example I move the UIImageView out of the UIView using an animation, I would like the circle to move with it. Important is the fact that the coordinates are relative to the whole screen.</p>