title: get image from transformed ImageView objective c in ios
body: <p>In the code below, <code>img</code> is not a transformed image. How do I transform the image?</p>
  
  <pre><code> CGAffineTransform transform = self.imageView.transform;
  
   if(transform.a == 1)
   {    
       transform.a = -1;
   }
   else
   {     
       transform.a = 1;   
   }
  
   self.imageView.transform = transform;
  
   UIImage *img = self.imageView.image;
  </code></pre>
  
  <p>This is the image:</p>
  
  <p><img src="https://i.stack.imgur.com/BIA9N.jpg" alt="enter image description here"></p>
  
  <p>After the transform, it should look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/x09Jj.jpg" alt="enter image description here"></p>