The following code shows animation of 5 images.

	NSArray *images = [NSArray arrayWithObjects:
	[UIImage imageNamed:@”pic1.jpeg”],
	[UIImage imageNamed:@”pic2.jpeg”],
	[UIImage imageNamed:@”pic3.jpg”],
	[UIImage imageNamed:@”pic4.jpeg”],
	[UIImage imageNamed:@”pic5.jpeg”],
	CGRect frame = CGRectMake(0,0,320,460);
	UIImageView *imageView = [[UIImageView alloc] initWithFrame:frame];
	imageView.animationImages = images;
	imageView.contentMode = UIViewContentModeScaleAspectFit;
	imageView.animationDuration = 3;
	imageView.animationRepeatCount = 0;
	[imageView startAnimating];
	[self.view addSubview:imageView];
	[imageView release];
	[super viewDidLoad];

Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.