Hi,
We are facing a issue with search bar which is placed in the UITableViewController's TableView header. Please refer the attached screenshot for more details.
The below code for creating the searchBar :-
// UISearchController is created
this.searchController = new UISearchController(this.resultsController)
{
WeakDelegate = this,
WeakSearchResultsUpdater = this
};
this.searchController.SearchBar.SizeToFit();
this.searchController.SearchBar.BarTintColor = UIResources.SearchBarBackgroundColor;
this.searchController.SearchBar.BackgroundColor = UIResources.SearchBarBackgroundColor;
this.searchController.SearchBar.WeakDelegate = this;
this.searchController.SearchBar.Placeholder = this.LocalizationService.Localize(LocalizationKeys.SearchBarHint);
this.searchController.HidesNavigationBarDuringPresentation = false;
this.searchController.SearchResultsController.EdgesForExtendedLayout = UIRectEdge.None;
this.searchController.SearchResultsController.AutomaticallyAdjustsScrollViewInsets = true;
// Added to UITableViewController's UITableView header view
this.reportListController.TableView.TableHeaderView = this.searchController.SearchBar;
Thanks & Regards,
Alok Pandey