I'm working with UISearchController in Xamarin.Ios and everything works fine but when I start typing, the SearchhResultUpdating method is not override is not firing. It works sometimes and doesn't somw other times but now it doesn't work at all.
Here's the SearchResultsUpdating Class:
class SearchResult : UISearchResultsUpdating
{
public event Action<string> UpdateSearchResults = delegate { };
public override void UpdateSearchResultsForSearchController(UISearchController searchController)
{
this.UpdateSearchResults(searchController.SearchBar.Text);
}
}
and Here's when I used it:
var searchresult = new SearchResult();
searchresult.UpdateSearchResults += searchResultsController.Search;
var searchController = new UISearchController(searchResultsController) { SearchResultsUpdater = searchresult };