如何开始这个目标C动画?

时间:2013-02-21 01:21:36

标签: objective-c

刚开始学习为iOS编程,有一个非常简单的问题,但无法弄明白。

UIImage *image = [UIImage imageNamed:@"robot.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];

/* Write your code below this line */

NSArray *robotImages = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"Robot1.png"],
        [UIImage imageNamed:@"Robot2.png"],
        [UIImage imageNamed:@"Robot3.png"],
        [UIImage imageNamed:@"Robot4.png"], nil];
imageView.animationImages = robotImages;
imageView.animationDuration = 5.0;

1 个答案:

答案 0 :(得分:1)

现在真的[imageView startAnimating];