diff --git a/Yep/ViewControllers/SocialWorks/SocialWorkDribbbleViewController.swift b/Yep/ViewControllers/SocialWorks/SocialWorkDribbbleViewController.swift
index c22723a4..6c4fec98 100644
--- a/Yep/ViewControllers/SocialWorks/SocialWorkDribbbleViewController.swift
+++ b/Yep/ViewControllers/SocialWorks/SocialWorkDribbbleViewController.swift
@@ -122,7 +122,7 @@ extension SocialWorkDribbbleViewController: UICollectionViewDataSource, UICollec
let shot = dribbbleShots[indexPath.item]
- cell.imageView.kf_setImageWithURL(NSURL(string: shot.images.normal)!)
+ cell.configureWithDribbbleShot(shot)
return cell
}
diff --git a/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.swift b/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.swift
index 228e62ab..33671d6d 100644
--- a/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.swift
+++ b/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.swift
@@ -7,15 +7,28 @@
//
import UIKit
+import Kingfisher
class DribbbleShotCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView!
+ @IBOutlet weak var activityIndicator: UIActivityIndicatorView!
+
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
+ func configureWithDribbbleShot(shot: DribbbleWork.Shot) {
+ imageView.kf_setImageWithURL(NSURL(string: shot.images.normal)!, placeholderImage: nil, optionsInfo: [.TargetCache: KingfisherOptions.CacheMemoryOnly], progressBlock: { receivedSize, totalSize in
+ if receivedSize < totalSize {
+ self.activityIndicator.startAnimating()
+ }
+ }, completionHandler: { image, error, cacheType, imageURL in
+ self.activityIndicator.stopAnimating()
+ })
+ }
+
}
diff --git a/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.xib b/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.xib
index 48eb253c..3c73ef90 100644
--- a/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.xib
+++ b/Yep/Views/Cells/DribbbleShot/DribbbleShotCell.xib
@@ -15,17 +15,23 @@
+
+
+
+
+
+