diff --git a/Yep/Configs/YepConfig.swift b/Yep/Configs/YepConfig.swift index fc374df3..164a9400 100644 --- a/Yep/Configs/YepConfig.swift +++ b/Yep/Configs/YepConfig.swift @@ -9,6 +9,12 @@ import UIKit import Ruler import CoreLocation +import Kingfisher + +let MediaOptionsInfos: KingfisherOptionsInfo = [ + .Options([.BackgroundDecode, .LowPriority]), + .Transition(ImageTransition.Fade(0.3)) +] class YepConfig { diff --git a/Yep/Extensions/UIImageView+Yep.swift b/Yep/Extensions/UIImageView+Yep.swift index 37fce7c2..539b6d66 100644 --- a/Yep/Extensions/UIImageView+Yep.swift +++ b/Yep/Extensions/UIImageView+Yep.swift @@ -34,7 +34,7 @@ extension UIImageView { return } - UIView.transitionWithView(strongSelf, duration: 0.5, options: .TransitionCrossDissolve, animations: { () -> Void in + UIView.transitionWithView(strongSelf, duration: 0.3, options: .TransitionCrossDissolve, animations: { () -> Void in strongSelf.image = image }, completion: nil) }) diff --git a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift index dbe2b087..8bbf871e 100644 --- a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift +++ b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift @@ -349,7 +349,7 @@ class FeedSocialWorkCell: FeedBasicCell { } if let URL = socialWorkImageURL { - socialWorkImageView.kf_setImageWithURL(URL, placeholderImage: nil) + socialWorkImageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: MediaOptionsInfos) } } diff --git a/Yep/Views/Cells/InstagramMedia/InstagramMediaCell.swift b/Yep/Views/Cells/InstagramMedia/InstagramMediaCell.swift index f70e7381..f1425fa4 100644 --- a/Yep/Views/Cells/InstagramMedia/InstagramMediaCell.swift +++ b/Yep/Views/Cells/InstagramMedia/InstagramMediaCell.swift @@ -9,11 +9,6 @@ import UIKit import Kingfisher -let MediaOptionsInfos: KingfisherOptionsInfo = [ - .Options([.BackgroundDecode, .LowPriority]), - .Transition(ImageTransition.Fade(0.55)) -] - class InstagramMediaCell: UICollectionViewCell { @IBOutlet weak var imageView: UIImageView!