Created
March 26, 2020 02:25
-
-
Save FabiolaRamirez/e43767814ec95021d17a9d07e48f324c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
let photo = photos[indexPath.row] | |
print("photogg:\(photo)") | |
showPhotoDetail(photo: photo) | |
} | |
func showPhotoDetail(photo: Photo) { | |
let vc: GalleryDetailViewController = UIViewController.instantiateViewController(storyBoard: "Gallery", identifier: "galleryDetailViewController") as! GalleryDetailViewController | |
vc.photo = photo | |
self.navigationController?.pushViewController(vc, animated: false) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment