-(void)addImageViewWithAnimation{
UIImageView *imgview = [[UIImageView alloc]
initWithFrame:CGRectMake(10, 10, 300, 400)]; // set an animation
imgview.animationImages = [NSArray arrayWithObjects: [UIImage
imageNamed:@"AppleUSA1.jpg"], [UIImage
imageNamed:@"AppleUSA2.jpg"], nil];
imgview.animationDuration = 4.0;
imgview.contentMode = UIViewContentModeCenter;
[imgview startAnimating];
[self.view addSubview:imgview];
}
This comment has been removed by the author.
ReplyDelete