title: Objective-C How to avoid drawing on same color image having stroke color of UIBezierPath
body: <p>We are working on a paint application using <code>UIBezierPath</code>,</p>
  
  <p>We did paint strokes using bezier path, </p>
  
  <p>with blue color RGB values and 0.5 Alpha for transparent stroke</p>
  
  <p>using paths array.. we almost complete the application,</p>
  
  <p>But there are some performance issues to drayong paint strokes from PathsArray which is having alredy drawn Bezierpaths, like paint strokes getting slow after drawing some number of strokes,</p>
  
  <p>So <strong>to avoid this performance issue we used an temperary image view behind the sketchImage View,</strong></p>
  
  <p>We drawn recent one stroke on Top Sketch Image view and updated the bottom Temperary iamge view with the PathsArray,</p>
  
  <p><strong>it works fine and imrove performance, but there is an issue</strong></p>
  
  <p><strong><em>that since all the strokes saved as image and we try to draw another image the strokes gets double and increase the opacity at overlaping points</em></strong></p>
  
  <p>actually <strong>we can avoid if we use only bezierPAths array</strong> using <strong><em><code>kCGBlendModeCopy</code></em></strong></p>
  
  <p><strong>But since we are updated stroke as image its not able</strong> with <strong><em><code>kCGBlendModeCopy</code></em></strong></p>
  
  <p>So is there any way to avoid stroke on same paint</p>
  
  <p><img src="https://i.stack.imgur.com/DUAgt.png" alt="enter image description here"></p>