Skip to content

Instantly share code, notes, and snippets.

@dotfold
Last active August 29, 2015 14:02
Show Gist options
  • Save dotfold/9c4efa2034e25a289be1 to your computer and use it in GitHub Desktop.
Save dotfold/9c4efa2034e25a289be1 to your computer and use it in GitHub Desktop.
- (void)animateProductImagesIn
{
[self reset];
CGFloat delayAmount = 0.2;
NSUInteger num = [self.productImages count];
for (int i=0; i < num; i ++)
{
UIImageView *view = [self.productImages objectAtIndex:i];
CGFloat delay = delayAmount * i;
[self animateProductImage:view withDelay:delay];
}
}
- (void)animateProductImage:(UIImageView *)image withDelay:(CGFloat)delay
{
__block UIImageView *theImage = image;
[UIView animateWithDuration:0.3
delay:delay
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
theImage.alpha = 1.0;
}
completion:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment