2012-04-26 4 views
0

私は背景イメージを持っていますが、アニメーション化することはできませんが、どのようにしたらよいか分かりません。UIImageViewの背景をアニメーション化する方法

どうすればよいですか?

+0

どのような種類のアニメーションですか?スピナー?スライディング上下?回転?前進と後退? – jmstone617

答えて

0

UIImageViewを使用し、animationImagesプロパティを画像の配列に設定します。期間を設定してstartAnimatingを呼び出すことができます。

Apple docs UIImageView

+0

私は1つのイメージしか持っていません。 – Marnerk

+0

それは単純な背景です... – Marnerk

+0

それを得ました! \t 'UIImageView * _backgroundView = [[UIImageView alloc] initWithImage:smoke] autorelease]; _backgroundView.frame = frame; [self.view addSubview:_backgroundView]; [UIView beginAnimations:@ "skyAnimated"コンテキスト:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDuration:0]; _backgroundView.frame = CGRectMake(_backgroundView.frame.origin.x + 100、_backgroundView.frame.origin.y \t \t \t \t \t \t \t \tから1000、 \t \t \t \t \t \t \t \t _backgroundView.frame.size .width、 \t \t \t \t \t \t \t _backgroundView.frame.size.height); [UIView commitAnimations]; ' – Marnerk

関連する問題