Created
December 17, 2020 03:48
-
-
Save KrauserHuang/1078f5fdb936ab3f7dd210e242438102 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
@IBSegueAction func showDetail(_ coder: NSCoder) -> UIViewController? { | |
// guard let item = collectionView.indexPathsForSelectedItems else { return nil } | |
//利用indexPathsForSelectedItems?.first?.item(row)來對應要顯示的物件 | |
guard let item = collectionView.indexPathsForSelectedItems?.first?.item else { return nil } | |
let controller = DetailViewController(coder: coder) | |
controller?.imageName = photos[item] | |
return controller | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment