刚开始学习为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;
答案 0 :(得分:1)
现在真的[imageView startAnimating];