I have a UISplitViewController
with a UINavigationController
as the masterviewcontroller. This UINavigationController
has a UICollectionViewController
as its rootViewController. In the UICollectionViewController
, I have set the following parameters:
self.collectionView.scrollEnabled = YES;
self.collectionView.bounces = YES;
self.collectionView.alwaysBounceVertical = YES;
self.navigationController.navigationBar.prefersLargeTitles = YES;
UISearchController *sc = [[UISearchController alloc] initWithSearchResultsController:nil];
self.navigationItem.searchController = sc;
The UISearchBar
does show up in the navigationBar, but when I launch the app the navbar is collapsed to the small title. It's only when I drag the view downwards that the large title and the search bar appear.
Where I expect the view to launch like this
it actually launches like this
Any ideas what could be causing this?