0
私はアニメーションを行うオブジェクトを持っています...多くの(25以上の)オブジェクトが同時にアニメーションをしている場合、ドラッグ中にジャークを引き起こしています...私は各オブジェクトに以下のコードを使用してアニメーションを作成しています。パフォーマンスを向上させるにはどうすればよいですか?多くのUIViewアニメーションがパフォーマンスの問題を引き起こしていますか?
#define DEFAULT_ANIM_SPPED 0.6
#define INFINATE_VALUE 1e100f
- (void)startAnimating
{
mBackgroundImageView.frame = mOriginalFrame;
[UIView beginAnimations:nil context:nil];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationRepeatCount:INFINATE_VALUE];
[UIView setAnimationDuration:DEFAULT_ANIM_SPPED];
CGRect tempFrame=mBackgroundImageView.frame;
tempFrame.origin.y -= mAnimationOffset;
mBackgroundImageView.frame=tempFrame;
[UIView commitAnimations];
}
スーパービューにはアニメーション化できない他のものがあります... –
スーパークラス自体が関与していない間にサブクラスをアニメーション化できない理由はわかりません。スーパークラスのアニメーションブロック内のサブクラスのフレームを変更します。 – MHC