I am trying to display a screen that shows a collection of video thumbnails, and when the user taps one of the thumbnails that video opens up. I have two view controllers, one being the collection view and one being the video player, and both are embedded in a navigation controller. I have the following code:
extension BrowserCollectionViewController {
override func collectionView(_ collectionView: UICollectionView,
shouldSelectItemAt indexPath: IndexPath) -> Bool {
self.performSegue(withIdentifier: "ShowPlayer", sender: indexPath)
return false
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "ShowPlayer" {
guard let sender = sender as? IndexPath else {
return
}
if let playViewController = segue.destination as? PlayerViewController {
playViewController.metadata = movies[movieIndex(sender)]
}
}
}
}
This works fine, except that the transition looks like a standard push segue and I would like it to look like the thumbnail expands to become the view controller (the player also happens to hide the navigation bar so it looks like a full-screen view). This looks exactly like the behavior of the original Photos app, so I thought it might be a standard transition.