Skip to content

Instantly share code, notes, and snippets.

@danstepanov
Created February 1, 2016 21:19
Show Gist options
  • Save danstepanov/638936388b2d472c2789 to your computer and use it in GitHub Desktop.
Save danstepanov/638936388b2d472c2789 to your computer and use it in GitHub Desktop.
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! ImageCell
for imageURL in self.imageURLs {
let URL = NSURL(string: imageURL as! String)!
cell.imageView.af_setImageWithURL(URL)
}
activityIndicator.stopAnimating()
return cell
}
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.imageURLs.count
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment