diff --git a/Tusker/Screens/Utilities/SplitNavigationController.swift b/Tusker/Screens/Utilities/SplitNavigationController.swift index cf7926d3..4fc7c1d4 100644 --- a/Tusker/Screens/Utilities/SplitNavigationController.swift +++ b/Tusker/Screens/Utilities/SplitNavigationController.swift @@ -55,6 +55,12 @@ class SplitNavigationController: UIViewController { if let tableVC = sender as? UITableViewController, let selectedIndexPath = tableVC.tableView.indexPathForSelectedRow { tableVC.tableView.deselectRow(at: selectedIndexPath, animated: true) + } else if let sender = sender as? UIViewController, + let collectionView = sender.view as? UICollectionView { + // the collection view's animation speed is weirdly fast, so we do it slower + UIView.animate(withDuration: 0.5, delay: 0) { + collectionView.indexPathsForSelectedItems?.forEach { collectionView.deselectItem(at: $0, animated: false) } + } } } else { self.rootNav.pushViewController(vc, animated: true)