Tag Archives: imageNamed

How to create a radioGroup in Android inside a Scrollview?

By | February 14, 2014

Here is a sample code that creates a radiobutton group inside a scrollview. Please make sure you have a scrollview in your UI and its linked. // This function adds the radio buttons inside the scrollview. Here I am using some of my variables to generate the count of radio buttons. Please make sure 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 »