         collectionView.alwaysBounceVertical = true
         collectionView.backgroundColor = .systemBackground
         collectionView.delegate = self
+        collectionView.dragDelegate = UIApplication.shared.supportsMultipleScenes ? self : nil
         return collectionView
     }()
     private let flowLayout: UICollectionViewFlowLayout = {

        flowLayout.minimumInteritemSpacing = 32
        return flowLayout
    }()
    private var dataSource: UICollectionViewDiffableDataSource<CollectionSection, County>!
    private var spotlightSearchController = SpotlightSearchController()
    private lazy var searchController: UISearchController = {
        let searchController = UISearchController(searchResultsController: nil)

        return snapshot
    }
    
    private func cellStyleForTraitCollection(_ traitCollection: UITraitCollection) -> CountyCellDisplayStyle {
        return traitCollection.horizontalSizeClass == .regular ? .grid : .table
    }
    
    @objc private func reloadData() {
        dataSource.apply(snapshotForCurrentState(), animatingDifferences: false)
    }
}

// MARK: UICollectionViewDelegateFlowLayout
extension CountiesViewController: UICollectionViewDelegateFlowLayout {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return cellStyleForTraitCollection(traitCollection).itemSizeInCollectionView(collectionView)
    }
    
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
        return cellStyleForTraitCollection(traitCollection).collectionViewEdgeInsets
    }
    
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return cellStyleForTraitCollection(traitCollection).collectionViewLineSpacing
    }
}

