Created
March 12, 2015 20:32
-
-
Save thomasdegry/f08937a1c9a80a348e24 to your computer and use it in GitHub Desktop.
Facebook pop jumps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)closeMethodWrapper { | |
POPSpringAnimation *radioButtonPositionAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionY]; | |
radioButtonPositionAnimation.springSpeed = 10.0f; | |
radioButtonPositionAnimation.springBounciness = 10.0f; | |
radioButtonPositionAnimation.toValue = @(200); | |
[self.radioButtonWrapper.layer pop_addAnimation:radioButtonPositionAnimation forKey:@"bar"]; | |
POPSpringAnimation *radioButtonScaleAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY]; | |
radioButtonScaleAnimation.springSpeed = 1.0f; | |
radioButtonScaleAnimation.springBounciness = 10.0f; | |
radioButtonScaleAnimation.toValue = [NSValue valueWithCGSize:CGSizeMake(0.9, 0.9)]; | |
[self.radioButtonWrapper pop_addAnimation:radioButtonScaleAnimation forKey:@"radiobutton.scale"]; | |
POPSpringAnimation *wrapperAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayoutConstraintConstant]; | |
wrapperAnimation.springSpeed = 20.0f; | |
wrapperAnimation.springBounciness = 5.0f; | |
wrapperAnimation.toValue = @(66); | |
[self.methodWrapperHeightConstraint pop_addAnimation:wrapperAnimation forKey:@"detailsContainerWidthAnimate"]; | |
} | |
- (void)openMethodWrapper { | |
POPSpringAnimation *radioButtonPositionAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionY]; | |
radioButtonPositionAnimation.springSpeed = 10.0f; | |
radioButtonPositionAnimation.springBounciness = 10.0f; | |
radioButtonPositionAnimation.toValue = @(220); | |
[self.radioButtonWrapper.layer pop_addAnimation:radioButtonPositionAnimation forKey:@"foo"]; | |
POPSpringAnimation *radioButtonScaleAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY]; | |
radioButtonScaleAnimation.springSpeed = 1.0f; | |
radioButtonScaleAnimation.springBounciness = 10.0f; | |
radioButtonScaleAnimation.toValue = [NSValue valueWithCGSize:CGSizeMake(1.0, 1.0)]; | |
[self.radioButtonWrapper pop_addAnimation:radioButtonScaleAnimation forKey:@"radiobutton.scale"]; | |
POPSpringAnimation *wrapperAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayoutConstraintConstant]; | |
wrapperAnimation.springSpeed = 15.0f; | |
wrapperAnimation.springBounciness = 10.0f; | |
wrapperAnimation.toValue = @(270); | |
[self.methodWrapperHeightConstraint pop_addAnimation:wrapperAnimation forKey:@"detailsContainerWidthAnimate"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment