我已经添加了一个 UIView,在那个 UIImageView 上使用 UIBuider,现在我想在那个 imageView 上应用动画,所以我拍摄了一组图像并通过这段代码将该数组添加到 imageView
NSArray *animationArray=[[NSArray alloc]init];
animationArray=[NSArray arrayWithObjects:
[UIImage imageNamed:@"rabbit1.png"],
[UIImage imageNamed:@"rabbit2.png"],
[UIImage imageNamed:@"rabbit3.png"],
[UIImage imageNamed:@"rabbit4.png"],
[UIImage imageNamed:@"rabbit5.png"],
[UIImage imageNamed:@"rabbit6.png"],
[UIImage imageNamed:@"rabbit7.png"],
[UIImage imageNamed:@"rabbit8.png"],
[UIImage imageNamed:@"rabbit9.png"],
[UIImage imageNamed:@"rabbit10.png"],
[UIImage imageNamed:@"rabbit11.png"],
[UIImage imageNamed:@"rabbit12.png"],
[UIImage imageNamed:@"rabbit13.png"], nil];
tempImageView.animationImages=animationArray;
tempImageView.animationDuration=2;
tempImageView.animationRepeatCount=0;
[tempImageView startAnimating];
tempImageView 是使用 UIBuider 创建的,但它没有工作,没有显示任何内容。