In this case, you want to revive NSLayoutConstraint, you can do the following with POP, and it will animate the constraint. Note that POPSpringAnimation is added to the constraint itself .
NSLayoutConstraint *constraint = // this is an NSLayoutConstraint that is applied to some view POPSpringAnimation *layoutAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayoutConstraintConstant]; layoutAnimation.springSpeed = 20.0f; layoutAnimation.springBounciness = 15.0f; layoutAnimation.toValue = @(value to go too); [constraint pop_addAnimation:layoutAnimation forKey:@"detailsContainerWidthAnimate"];
The main property to use is kPOPLayoutConstraintConstant, as shown above. Therefore, if you want to do this with automatic layout constraints, you can use this constraint property.
Working with the scale and other properties also works with AutoLayout, so you should have no problem getting POP to work with AutoLayout.
darren102
source share