Last active
February 24, 2021 00:45
-
-
Save karigrooms/4c221bebb89b293e545c3f4dc80055f3 to your computer and use it in GitHub Desktop.
Blog post: SwiftUI with UICollectionView - 16. Present the property details when a property card is tapped
This file contains hidden or 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
// MARK: UICollectionViewDelegate | |
extension CollectionViewExample: UICollectionViewDelegate { | |
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | |
let item = items[indexPath.row] | |
let pdp = PropertyDetailsViewController(property: item) | |
pdp.modalPresentationStyle = .formSheet | |
present(pdp, animated: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment