title: iOS: UIDynamicAnimator updateItemUsingCurrentState not working with rotation
body: <p>I am trying to manually change rotation of a view in <code>UIDynamics</code>, but the view's rotation is always reset after update. The <a href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIDynamicAnimator_Class/Reference/Reference.html" rel="nofollow noreferrer">documentation</a> says, that <code>UIDynamicAnimator</code>'s <code>updateItemUsingCurrentState:</code> method should update position and rotation of an item, but only position is updated.<br/>
  I created a short example where a square view is falling from the screen and after a touch it should be positioned to the location of the touch and rotated to 45 degrees. However, no rotation happens (sometimes the rotation can be seen for a fraction of a second, but after that it is reset again):</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  {
      UIDynamicAnimator* _animator;
      UIView* _square;
  }
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      _square = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
      _square.backgroundColor = [UIColor grayColor];
      [self.view addSubview:_square];
  
      _animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];
      UIGravityBehavior *gravityBehavior = [[UIGravityBehavior alloc] initWithItems:@[_square]];
      gravityBehavior.magnitude = 0.1;
      [_animator addBehavior:gravityBehavior];
  }
  
  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  {
      UITouch *touch = [[event allTouches] anyObject];
      _square.center = [touch locationInView:self.view];
      NSLog(@"transform before rotation: %@", NSStringFromCGAffineTransform(_square.transform));
      _square.transform = CGAffineTransformMakeRotation(M_PI/4);
      [_animator updateItemUsingCurrentState:_square];
      NSLog(@"transform after rotation: %@", NSStringFromCGAffineTransform(_square.transform));
  }
  @end
  </code></pre>
  
  <p>(I've left here all code, so that you can copy-paste it into a newly created project. Hopefully there isn't too much of irrelevant code to make it disturbing)</p>
  
  <p>So am I doing something wrong? Or isn't it possible to explicitly change rotation of the view?</p>