- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// create the view that will execute our animation
flameAnimation= [[UIImageView alloc]initWithFrame:self.view.frame];
// load all the frames of our animation
flameAnimation.animationImages= [NSArray arrayWithObjects:
[UIImageimageNamed:@"iFlame 001.jpg"],
[UIImageimageNamed:@"iFlame 002.jpg"],
[UIImageimageNamed:@"iFlame 003.jpg"],
[UIImageimageNamed:@"iFlame 004.jpg"],
[UIImageimageNamed:@"iFlame 005.jpg"],
[UIImageimageNamed:@"iFlame 006.jpg"],
[UIImageimageNamed:@"iFlame 007.jpg"],
[UIImageimageNamed:@"iFlame 008.jpg"],
[UIImageimageNamed:@"iFlame 009.jpg"],
[UIImageimageNamed:@"iFlame 010.jpg"],
[UIImageimageNamed:@"iFlame 009.jpg"],
[UIImageimageNamed:@"iFlame 008.jpg"],
[UIImageimageNamed:@"iFlame 007.jpg"],
[UIImageimageNamed:@"iFlame 006.jpg"],
[UIImageimageNamed:@"iFlame 005.jpg"],
[UIImageimageNamed:@"iFlame 004.jpg"],
[UIImageimageNamed:@"iFlame 003.jpg"],
[UIImageimageNamed:@"iFlame 002.jpg"],nil];
// all frames will execute in 1.75 seconds
flameAnimation.animationDuration= 1.0;
// repeat the annimation forever
flameAnimation.animationRepeatCount= 0;
// start animating
[flameAnimation startAnimating];
// add the animation view to the main window
[self.viewaddSubview:flameAnimation];
pumpkinFace= [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pumpkinFace.png"]];
[self.viewaddSubview:pumpkinFace];
}}