画像ビューをアニメーション表示しています。画像をタップすると、反転してからアニメーションを開始します。すべてがうまくいきますが、画像をタップした後にアプリがバックグラウンドになると、アニメーションが再開しません。アプリがアクティブになると、画像ビューがアニメーションを再開しません。
[UIView animateWithDuration:0.8 delay:0.2 options:UIViewAnimationOptionTransitionNone animations:^{
ImageView.layer.transform = CATransform3DMakeRotation(M_PI/2, -1, 1, 0);
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.7 delay:0.0 options:UIViewAnimationOptionTransitionNone animations:^{
ImageView.layer.transform = CATransform3DMakeRotation(0, 0, 1, 1);
[_aCardImageView setImage:[UIImage imageNamed:[imageArray objectAtIndex:index_value]]];
}
completion:^(BOOL finished){
[_aCardImageView setImage:[UIImage imageNamed:[_back_imageArray objectAtIndex:index_value]]];
[ImageView setUserInteractionEnabled:NO];
CGRect frame = [[Frames_array objectAtIndex:index_value]CGRectValue];
[self lip_sequence:index_value :frame];
}
}];
私はこれを以前に試みましたが、再開できませんでした – Bharathi
これは間違いなく動作します。私はこのアプローチを何回か使用しました。あなたはgithubや他の場所にサンプルプロジェクトを投稿することができます。 –