title: Convert image with overlay view into UIImage
body: <p>In my app I have an Image which is shown to user and the overlay view with custom drawing by CoreGraphics. I want to save the image with overlay over it into CameraRoll.
  So how should I make a new UIImage from existing UIImage and custom overlay view?</p>
  
  <p>I tried to do it by creating the CGContextRef, drawing the UIImage into it, and then drawing the CALayer of the overlay view into the same context. But the UIImage which I get from this context is then just the overlay view over white background. It does't seem to preserve transparency and just fills everything with white color.</p>
  
  <p>How can it be fixed?</p>
  
  <p>Thank you.</p>