Reputation: 1423
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];
the problem here is i want to set only one image so i have used arraywithobject but when i run this code it is giving me error that too many paramters for arrayWithObject. What is problem.Can anybody help me in solving this problem
Upvotes: 0
Views: 94