Skip to content

Instantly share code, notes, and snippets.

@macbaszii
Created February 5, 2015 07:51
Show Gist options
  • Save macbaszii/1e92467cf8bf5c9d253a to your computer and use it in GitHub Desktop.
Save macbaszii/1e92467cf8bf5c9d253a to your computer and use it in GitHub Desktop.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
if segue.identifier == "ViewImage" {
let imageViewController = segue.destinationViewController as ImgurImageViewController
let cell = sender as ImageCollectionViewCell
if let indexPath = imagesCollectionView.indexPathForCell(cell) {
imageViewController.imgurImage = images[indexPath.row]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment