我创建一个NSMutableArray,我添加了它的图像。 还我创造,我要表现出从阵列图像的ImageView的,我试图用animationImages,但我没有什么事,我该如何解决呢? 这里是我的代码:
//Numbers images
UIImage *numberZero = [UIImage imageNamed:@"numberZero.png"];
UIImage *numberOne = [UIImage imageNamed:@"numberOne.png"];
UIImage *numberTwo = [UIImage imageNamed:@"numberTwo.png"];
UIImage *numberThree = [UIImage imageNamed:@"numberThree.png"];
UIImage *numberFour = [UIImage imageNamed:@"numberFour.png"];
UIImage *numberFive = [UIImage imageNamed:@"numberFive.png"];
UIImage *numberSix = [UIImage imageNamed:@"numberSix.png"];
UIImage *numberSeven = [UIImage imageNamed:@"numberSeven.png"];
UIImage *numberEight = [UIImage imageNamed:@"numberEight.png"];
UIImage *numberNine = [UIImage imageNamed:@"numberNine.png"];
//add numbers uiimage to numbersArray
numbersArray = [NSMutableArray arrayWithObjects:numberZero, numberOne, numberTwo, numberThree, numberFour, numberFive, numberSix, numberSeven, numberEight, numberNine, nil];
imgview1 = [[UIImageView alloc] init];
imgview1.animationImages = numbersArray;
imgview1.animationDuration = 2;
imgview1.animationRepeatCount=0;
[imgview1 startAnimating];
[imgview1 stopAnimating];
谢谢!