Changes BrowseViewController’s search bar placement to inline

This commit is contained in:
Riley Testut
2023-12-07 17:42:02 -06:00
parent 2b2ad176e4
commit 38ff3b1d96

View File

@@ -49,10 +49,11 @@ class BrowseViewController: UICollectionViewController, PeekPopPreviewing
self.collectionView.backgroundColor = .altBackground
self.collectionView.alwaysBounceVertical = true
#if BETA
self.dataSource.searchController.searchableKeyPaths = [#keyPath(InstalledApp.name)]
self.dataSource.searchController.searchableKeyPaths = [#keyPath(StoreApp.name),
#keyPath(StoreApp.subtitle),
#keyPath(StoreApp.developerName),
#keyPath(StoreApp.bundleIdentifier)]
self.navigationItem.searchController = self.dataSource.searchController
#endif
self.prototypeCell.contentView.translatesAutoresizingMaskIntoConstraints = false
@@ -87,6 +88,10 @@ class BrowseViewController: UICollectionViewController, PeekPopPreviewing
self.navigationItem.scrollEdgeAppearance = edgeAppearance
}
if #available(iOS 16, *)
{
self.navigationItem.preferredSearchBarPlacement = .inline
}
self.preparePipeline()