UIImageView Animation

NSArray *images = [NSArray arrayWithObjects:

[UIImage imageNamed:@"image.png"],

[UIImage imageNamed:@"image2.png"],

[UIImage imageNamed:@"image3.png"],

[UIImage imageNamed:@"image4.gif"],

nil];


UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 200)];

imageView.animationImages = images;

imageView.animationDuration = 1;

imageView.animationRepeatCount = 0; // 0 = nonStop repeat

[imageView startAnimating];


[self.view addSubview:imageView];

[imageView release];

1 comment: