ユーザーイベントを履歴に保存するアプリがあります。イベントは1つのコントローラーに追加され、別のタブ内のコントローラーに表示されます。
ユーザーが「保存ボタン」をタップすると、イベントが記録されたことを視覚的に確認できるようにしたいと思います。ユーザーにレコードを表示する役割を担うタブバーコントローラーに向かって移動するように、インターフェイス要素をアニメーション化することを考えています。
そのために、インターフェイス要素の1つの中心点をアニメーション化することを考えています。中心点をアニメートする方法は知っていますが、直線でアニメートします。中心点をより「湾曲した」方法でアニメートするにはどうすればよいですか?これを達成する方法はありますか?
CGPoint center = self.ratingReticle.center;
[UIView animateWithDuration:0.6 delay:0 options:UIViewAnimationCurveEaseIn animations:^{
//move the element offscreen
self.ratingReticle.center = CGPointMake(260,500);
} completion:^(BOOL finished) {
//hide the interace element once it is offscreen
self.ratingReticle.alpha = 0;
//restore the position of the interface element
self.ratingReticle.center = center;
[ UIView animateWithDuration:0.4 animations:^{
//fade the element back at the original position
self.ratingReticle.alpha = 1;
} completion:^(BOOL finished) {
}];
}];