title: How to save image with transparent stroke
body: <p>I followed @Rob answer and its drawn as I want...but when I saved this image....stroke not transparent anymore</p>
  
  <p><a href="https://stackoverflow.com/questions/20263379/objective-c-how-to-avoid-drawing-on-same-color-image-having-stroke-color-of-uibe?rq=1">Objective-C How to avoid drawing on same color image having stroke color of UIBezierPath</a></p>
  
  <p>For save image I written this code</p>
  
  <p><img src="https://i.stack.imgur.com/OSDMl.png" alt="enter image description here"></p>
  
  <pre><code> -(void)saveImage {
      UIGraphicsBeginImageContextWithOptions(self.upperImageView.bounds.size, NO, 0);
  
      if ([self.upperImageView   respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)])
          [self.upperImageView drawViewHierarchyInRect:self.upperImageView.bounds afterScreenUpdates:YES]; // iOS7+
      else
          [self.upperImageView.layer     renderInContext:UIGraphicsGetCurrentContext()]; // pre iOS7
      UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
      UIGraphicsEndPDFContext();
  
      UIImageWriteToSavedPhotosAlbum(self.upperImageView.image, self,@selector(image:didFinishSavingWithError:contextInfo:), nil);
  }
  </code></pre>