Closed yexiahua closed 9 years ago
Could you attach a video? Nothing is wrong on a cursory inspection.
on ios8 test. thank you
I also met.
The issue is that the scale goes below zero, so it flips vertically. You'll want to use the clampMode
property to clamp it to the end value when scaling down.
:+1:
my code
show: POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerScaleXY]; springAnimation.fromValue = [NSValue valueWithCGSize:CGSizeMake(0.1f, 0.1f)]; springAnimation.toValue = [NSValue valueWithCGSize:CGSizeMake(1.0f, 1.0f)]; springAnimation.springSpeed = 10.0; springAnimation.springBounciness = 10.0f; [_optionBgSC.layer pop_addAnimation:springAnimation forKey:@"scaleAnimation"];
hide: POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerScaleXY]; springAnimation.fromValue = [NSValue valueWithCGSize:CGSizeMake(1.0f, 1.0f)]; springAnimation.toValue = [NSValue valueWithCGSize:CGSizeMake(0.0f, 0.0f)]; springAnimation.springSpeed = 10.0; springAnimation.springBounciness = 10.0f; [_optionBgSC.layer pop_addAnimation:springAnimation forKey:@"scaleAnimation"];