私のチェーンアニメーションの1つに奇妙な問題があります。私は自分の画面(26個)のブロックごとにブロックオブジェクトを持っており、ユーザーがそれらを押すとフリップを実行します。それは素晴らしいですが、私はこれらを行う前にスケールのアニメーションを追加して、画面上で約50%大きくします。だから、私の順序は次のとおりです。ios transform.rotation.yはウィンドウを分割します
は 遅延(ユーザーが大きな画像を見てみましょう) スピンアウトが90%(ビューからブロックを削除します)拡大 - transform.rotation.y 変化画像&スピンで シュリンクを使用します。
私は(setZpositionを使用して)上の右副層を配置できるように、それがブロックにカウンタを渡すことができるように、これらのブロックの代表であると設定ウィンドウの表示制御部を有します。
2つのブロックが画面上に上下に配置されている場合を除き、拡大がオーバーラップしてスピンアウトアニメーションが開始されると、すぐにブロックポップの右端がその下のブロックの後ろにあります。私はtransform.rotation.xにアニメーションを変更しようとしたが、ブロックが左右にあるときに同じ動作をする。
私はちょうど何か正しいことをしていない場合のiOSのバグかどうかはわかりません。どんな提案も大歓迎です。ここにスピンアウトの方法があります:
- (void)spinOut:(id)sender
{
NSTimeInterval animationTime=0.85;
[UIView animateWithDuration:animationTime
delay:0
options: UIViewAnimationOptionCurveLinear
animations:^{
// setup the animation to spin the current view out
[CATransaction begin];
[CATransaction setDisableActions:YES];
CABasicAnimation *spinOut = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"];
[spinOut setDelegate:self];
[spinOut setDuration:animationTime];
CAMediaTimingFunction *tf = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
[spinOut setTimingFunction:tf];
[spinOut setFromValue:[NSNumber numberWithFloat:M_PI * 0.0]];
[spinOut setToValue:[NSNumber numberWithFloat:M_PI * 0.5]];
[spinOut setRemovedOnCompletion:NO];
[spinOut setFillMode:kCAFillModeForwards];
// setup variables used to roll in the next view on animation completion.
[pageView.layer addAnimation:spinOut forKey:kMyVeryOwnABCsSpinOutKey];
[CATransaction commit];
}
completion:^(BOOL finished){
[self setFlipOutAnimationTimer:[NSTimer scheduledTimerWithTimeInterval:animationTime target:self selector:@selector(spinIn:) userInfo:nil repeats:NO]];
}];
}
よく、これは難しい問題です。イメージを縮小した後でスピンを行うつもりです。私は十分に良いと思う。 – jpporterVA