title: iOS Large Title Navigation hide search bar
body: <p>I have a view controller which have a carousel with 3 pages. On the first page i have a collection view and want to enable the search bar in the navigation bar but on the two other pages i don't want it. So on the page selection callback i set searchcontroller to null when it's the second and third page and set it back to the searchcontroller object when it's first page.</p>
  
  <p>It works well but i have no animation and the View controller doesn't resize and we can see a blank space between the view and the navigation bar when the search bar is hidden. Is there a way to achieve this properly ?</p>
  
  <p>My ViewDidLoad code:</p>
  
  <pre><code> public override void ViewDidLoad()
      {
          base.ViewDidLoad();
  
          searchController = new UISearchController(searchResultsController: null)
          {
              HidesNavigationBarDuringPresentation = true,
              DimsBackgroundDuringPresentation = false,
              //ObscuresBackgroundDuringPresentation = true
          };
          searchController.SearchBar.SearchBarStyle = UISearchBarStyle.Minimal;
          DefinesPresentationContext = true;
          NavigationItem.SearchController = searchController;
      }
  </code></pre>
  
  <p>Following the page selection callback:</p>
  
  <pre><code>void OnPageSelected()
      {
          if (page is IVehiclesSearchView)
          {
              NavigationItem.SearchController = searchController;           
          }
          else
          {
              NavigationItem.SearchController = null;
          }     
      }
  </code></pre>
  
  <p>Thank you !</p>