title: UIView Infinite 360 degree rotation animation?
body: <p>I'm trying to rotate a <code>UIImageView</code> 360 degrees, and have looked at several tutorials online. I could get none of them working, without the <code>UIView</code> either stopping, or jumping to a new position.</p>
  
  <ul>
  <li>How can I achieve this?</li>
  </ul>
  
  <p>The latest thing I've tried is:</p>
  
  <pre><code>[UIView animateWithDuration:1.0
                        delay:0.0
                      options:0
                   animations:^{
                       imageToMove.transform = CGAffineTransformMakeRotation(M_PI);
                   } 
                   completion:^(BOOL finished){
                       NSLog(@"Done!");
                   }];
  </code></pre>
  
  <p>But if I use 2*pi, it doesn't move at all (since it's the same position). If I try to do just pi (180 degrees), it works, but if I call the method again, it rotates backwards.</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <pre><code>[UIView animateWithDuration:1.0
                        delay:0.0
                      options:0
                   animations:^{
                       [UIView setAnimationRepeatCount:HUGE_VALF];
                       [UIView setAnimationBeginsFromCurrentState:YES];
                       imageToMove.transform = CGAffineTransformMakeRotation(M_PI);
                   } 
                   completion:^(BOOL finished){
                       NSLog(@"Done!");
                   }];
  </code></pre>
  
  <p>doesn't work either. It goes to <code>180</code> degrees, pauses for a split second, then resets back to <code>0</code> degrees before it starts again.</p>