我喜欢在倾斜时开始这个动画。它没有,所以我想缺少一些基本代码。请帮忙:
- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {
flap.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed: @"ronnie1.png"],
[UIImage imageNamed: @"ronnie2.png"],
[UIImage imageNamed: @"ronnie3.png"],
[UIImage imageNamed: @"ronnie4.png"],
[UIImage imageNamed: @"ronnie5.png"],
[UIImage imageNamed: @"ronnie6.png"],
[UIImage imageNamed: @"ronnie7.png"],
[UIImage imageNamed: @"ronnie8.png"],
[UIImage imageNamed: @"ronnie9.png"],
[UIImage imageNamed: @"ronnie10.png"],nil];
[flap setAnimationRepeatCount:1];
flap.animationDuration = 2;
[flap startAnimating];
}