0
Facebook Popライブラリを使用して、アプリで何か起こるたびにビューをバウンスします。問題はアニメーションが最初のオカレンスでのみ機能することです。Facebookのアニメーションは一度しか動作しません
それはこのスニペット
- (IBAction)buttonAction:(id)sender
{
POPSpringAnimation *sprintAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewScaleXY];
sprintAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(0.9, 0.9)];
sprintAnimation.velocity = [NSValue valueWithCGPoint:CGPointMake(2, 2)];
sprintAnimation.springBounciness = 20.f;
[self.shakeView pop_addAnimation:sprintAnimation forKey:@"springAnimation"];
}
ボタンをタップする第一の時間で簡単に再現可能であり、shakeView
は後のタップに正しくなく、アニメーション化されて。
新しいアニメーションを追加する前に[self.shakeView pop_removeAllAnimations]
を使ってすべてのアニメーションを削除しようとしましたが、うまくいきません。
私はポップの使い方で何かを逃したと思う。