 import UIKit
 import Nuke
 import NukeAnimatedImagePlugin
+import FLAnimatedImage
 
 private let textViewCellReuseID = "textViewReuseID"
 private let imageCellReuseID = "imageCellReuseID"

    }
    
    func setImageWithRequest(request: ImageRequest) {
        self.imageView.setImageWithRequest(request)
        if let task = self.imageView.imageTask {
            task.progress = { [weak self, weak task] _, _ in
                guard let task = task where task == self?.imageView.imageTask else {
                    return
                }
                self?.progressView.setProgress(Float(task.fractionCompleted), animated: true)
                if task.fractionCompleted == 1 {
                    UIView.animateWithDuration(0.2) {
                        self?.progressView.alpha = 0
                    }
                }
            }
        }
        if self.imageView.imageTask?.state == .Completed {
            self.progressView.alpha = 0;
        }
    }

}

private class AnimatedImageCell: UICollectionViewCell {
    private let imageView = FLAnimatedImageView(frame: CGRectZero)
    private let progressView = UIProgressView()
    
    override init(frame: CGRect) {
