Tag Archives: viewDidLoad

Using NSOperationQueue in iOS to do Serial/Concurrent Operations.

By | May 7, 2016

NSOperationQueue is used to do scheduled operations in iOS. You can customize NSOperationQueue to do Concurrent/Serial operations. You can set NSOperationQueue maxConcurrentOperationCount to tell it to do how many operations to execute at a time. Lets see this with an example [Swift Version] In the above example, we set maxConcurrentOperationCount to 1, telling it to… Read More »

How to animate a series of images in iphone? A simple Example.

By | April 12, 2012

The following code shows animation of 5 images. -(void)viewDidLoad { NSArray *images = [NSArray arrayWithObjects: [UIImage imageNamed:@”pic1.jpeg”], [UIImage imageNamed:@”pic2.jpeg”], [UIImage imageNamed:@”pic3.jpg”], [UIImage imageNamed:@”pic4.jpeg”], [UIImage imageNamed:@”pic5.jpeg”], nil]; 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… Read More »