Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Commit

Permalink
Added ability to set the animation duration for fading in the image
Browse files Browse the repository at this point in the history
  • Loading branch information
holgersindbaek committed Mar 30, 2016
1 parent 0d25a3e commit ac936cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Pod/Source/UI/DFImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ - (instancetype)initWithCoder:(NSCoder *)decoder {
- (void)_commonInit {
self.imageManager = [DFImageManager sharedManager];
_allowsAnimations = YES;
self.animationDuration = 0.25f;
_fadeDuration = 0.25f;
}

- (void)prepareForReuse {
Expand Down Expand Up @@ -85,7 +85,7 @@ - (void)didCompleteImageTask:(nonnull DFImageTask *)task withImage:(nullable UII
animation.keyPath = @"opacity";
animation.fromValue = @0.f;
animation.toValue = @1.f;
animation.duration = self.animationDuration;
animation.duration = self.fadeDuration;
animation;
}) forKey:@"opacity"];
} else {
Expand Down

0 comments on commit ac936cb

Please sign in to comment.