title: UIImageView Rotation Matrix is Performing a Skew
body: <p>I have a rather puzzling problem. I have a UIImageView to which I supply an angle in radians to a function that rotates it. It works fine, however I now want to offset the angle by a constant. Funny thing is if I do any sort of division or multiplication to the offset variable against M_PI the imageview is skewed and not rotated??</p>
  
  <pre><code>- (void)rotateDialToAngle: (CGFloat)angle {
  
      CGFloat offsetAngle = -0.075f * (2.0f * M_PI);
      offsetAngle += angle;
  
      if(offsetAngle &gt;= M_PI * 2)
          offsetAngle -= M_PI * 2;
      if(offsetAngle &lt; 0)
          offsetAngle += (M_PI * 2);
  
      self.clockDialImageView.transform = CGAffineTransformMakeRotation(offsetAngle);
  }
  </code></pre>
  
  <p>The code above is the intended state. If I replace the offSetAngle calculation with M_PI it has the expected behaviour of offsetting the rotation by 180 degrees. If I replace it with M_PI / 2 or anything else, I get the skew behaviour.</p>
  
  <p>The if statements are used to clamp the degrees to positive degrees no greater than 360. These work as expected.</p>
  
  <p>Note: this is the only function in the code that does any form of transformation on the image view.</p>
  
  <p>Note 2: Although the view is skewed, the rotation is still applied.</p>
  
  <p>Edit: Additional transforms in the code does not explain how the problem is SO isolated to a single line of code and an operation on a constant in that line.
  Edit: Looked for other transforms - Nothing. CMPopTipView is external to this controller and not used. As is DejalActivityView.</p>
  
  <p><img src="https://i.stack.imgur.com/AWTlv.png" alt="Transform Search"></p>
  
  <p>Any other ideas?</p>