SKBounce动画SKBounceAnimation是一个CAKeyframeAnimation子类,它根据开始和结束值以及反弹次数为您创建动画。它基于这篇的数学和技术:而这又部分基于Matt Gallagher的工作。用法基本代码很简单:NSString keyPath = \"position.y\"; id finalValue = [NSNumber numberWithFloat:300]; [view.layer setValue:finalValue forKeyPath:keyPath]; SKBounceAnimation bounceAnimation = [SKBounceAnimation animationWithKeyPath:keyPath]; bounceAnimation.fromValue = [NSNumber numberWithFloat:0];