Last active
August 29, 2015 14:02
-
-
Save dotfold/9c4efa2034e25a289be1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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