title: NSUndoManager to undo UIImage rotation using rotation gesture
body: <p>How to use <code>NSUndoManager</code> to rotate a <code>UIImageView</code> using rotation gesture? This is my code for rotation.</p>
  
  <pre><code>- (void)handleRotate:(UIRotationGestureRecognizer *)recognizer 
  {
      if (recognizer.state == UIGestureRecognizerStateBegan) {
          prevRotation = 0.0;
      } 
  
      float thisRotate = recognizer.rotation - prevRotation;
      prevRotation = recognizer.rotation;
      recognizer.view.transform = CGAffineTransformRotate(recognizer.view.transform, thisRotate);
  
      CGPoint lastpoint = point;
  }
  </code></pre>