From d1ff6acbec871fcdabbb60ded9ae9302947c6583 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Sat, 12 Dec 2015 16:40:04 +0800 Subject: [PATCH] fix gif animation in Feeds --- Podfile | 2 +- Podfile.lock | 2 +- Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Podfile b/Podfile index a051da5a..f095a405 100644 --- a/Podfile +++ b/Podfile @@ -18,7 +18,7 @@ def pods pod 'pop' pod 'MZFayeClient', :path => '../CatchLib-iOS/MZFayeClient/' pod 'RealmSwift' - pod 'MonkeyKing', '~> 0.0.2' + pod 'MonkeyKing', '0.0.2' pod 'JPush-iOS-SDK' pod 'Fabric' pod 'Crashlytics' diff --git a/Podfile.lock b/Podfile.lock index c57dc6dc..bcab57ad 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -42,7 +42,7 @@ DEPENDENCIES: - JPush-iOS-SDK - KeyboardMan - Kingfisher - - MonkeyKing (~> 0.0.2) + - MonkeyKing (= 0.0.2) - MZFayeClient (from `../CatchLib-iOS/MZFayeClient/`) - Navi - pop diff --git a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift index 17f2e5ec..3b81bc6e 100644 --- a/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift +++ b/Yep/Views/Cells/FeedSocialWork/FeedSocialWorkCell.swift @@ -352,7 +352,10 @@ class FeedSocialWorkCell: FeedBasicCell { } if let URL = socialWorkImageURL { - socialWorkImageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: MediaOptionsInfos) + // 暂时改为如此,参考 nix 的 PR https://github.com/onevcat/Kingfisher/pull/171 + // 原因为 MediaOptionsInfos 里的 decode 属性会导致 Kingfisher 丢失 GIF 的 images,不再有动画 + socialWorkImageView.kf_setImageWithURL(URL, placeholderImage: nil) + //socialWorkImageView.kf_setImageWithURL(URL, placeholderImage: nil, optionsInfo: MediaOptionsInfos) } }