Iphone 如何调用objective-C中特定时间段的中间图像
这里的问题是我只想设置一个图像,所以我使用了arraywithobject,但是当我运行这段代码时,它给我的错误是arraywithobject的参数太多。问题是什么。有人能帮我解决这个问题吗?Iphone 如何调用objective-C中特定时间段的中间图像,iphone,objective-c,Iphone,Objective C,这里的问题是我只想设置一个图像,所以我使用了arraywithobject,但是当我运行这段代码时,它给我的错误是arraywithobject的参数太多。问题是什么。有人能帮我解决这个问题吗?数组WithObject:只接受一个参数,所以只需删除,nil UIImageView *campFireView=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)]; //UIImageView *campF
数组WithObject:
只接受一个参数,所以只需删除,nil
UIImageView *campFireView=[[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,480)];
//UIImageView *campFireView =[[UIImageView alloc] initWithFrame:campFireView];
// load all the frames of our animation
campFireView.animationImages = [NSArray arrayWithObject:[UIImage imageNamed:@"Img_0.jpg"],
nil];
// all frames will execute in 1.75 seconds
campFireView.animationDuration = 1.75;
// repeat the annimation forever
campFireView.animationRepeatCount = 1000.0;
// start animating
[campFireView startAnimating];
// add the animation view to the main window
[self.view addSubview:campFireView];
[campFireView release];