title: Trying to shake UIButton (that have constraints) by trying to change constraints etc but nothing happens?
body: <p>My button has a constraint that it should center horizontally in the superview. I tried to just change my constraint but nothing happens. My idea is that I move my button to the side and then back and add a springy automation.</p>
  
  <pre><code>- (void)shakeView {
      NSLog(@"Shake it baby!");
      NSUInteger centerDefault = self.loginButtonHorizontalCenterConstraint.constant;
      self.loginButtonHorizontalCenterConstraint.constant = centerDefault + 50;
  
      [self.view layoutIfNeeded];
      //  self.signInContainerCenterPosition = constraint
      self.loginButtonHorizontalCenterConstraint.constant = centerDefault;
  
      [self.view setNeedsUpdateConstraints];
      [UIView animateWithDuration:1.5 delay:0.0 usingSpringWithDamping:0.1 initialSpringVelocity:40 options:UIViewAnimationOptionCurveLinear animations:^{
  
          [self.view layoutIfNeeded];
      } completion:^(BOOL finished) {
  
  
      }];
  }
  </code></pre>
  
  <p>So, I got two questions. Why can't I move my button to the side with 50px and is this a  viable way to get my uibutton to shake?</p>