title: Animation of UILabel and UITextField (Facebook POP framework)
body: <p>I'm using the Facebook POP framework to animate <code>UILabels</code> and <code>UITextFields</code> when the user entered a wrong input. I want to simulate the kind of spring animation when you enter the wrong password in on a mac.</p>
  
  <p>I've writting this method for doing the shake animation:</p>
  
  <pre><code>- (void)shakeAnimation:(UITextField *)textField :(UILabel *)label
  {
    //This method takes a textField and a label as input, and animates them accordingly. 
    //When the animation is done, the button is available for touch again, and the animation is removed.
  
    POPSpringAnimation *positionAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionX];
    positionAnimation.springBounciness = 20; //just parameters, nothing fancy
    positionAnimation.velocity = @4000;
    [positionAnimation setCompletionBlock:^(POPAnimation *animation, BOOL finished) {
      self.signUpButton.userInteractionEnabled = YES;
    }];
    [textField.layer pop_addAnimation:positionAnimation forKey:@"positionAnimation"];
    [label.layer pop_addAnimation:positionAnimation forKey:@"positionAnimation"];
    [positionAnimation removedOnCompletion];
  
  }
  </code></pre>
  
  <p>However, When I'm calling this method like so: <code>[self shakeAnimation:self.emailField :self.emailLabel];</code></p>
  
  <p>the <code>UILabels</code> only move about 50px to the right and then stop moving, whereas the <code>UITextFields</code> don't do anything. It doesn't seem like an animation at all, just an adjustment of the frame.</p>