As I understand, the default behaviour of UISearchController
is:
- On tapping search bar, background is dimmed and 'cancel' button is shown.
SearchResultsController
is not shown till this point. SearchResultsController
is displayed only if search bar is not empty.
I want to display SearchResultsController
even when search bar is empty but selected (i.e is case 1 above).
Simply put, instead of background dimming, I would like to show Search results.
Is there a way for doing this?
More Clarification:
I am not using UISearchController
to filter results shown on the view on which it is shown, but some other unrelated results.
It will be like what facebook does on its 'News Feed'. Tapping on search bar shows search suggestions initially and then, when we start editing, it shows search results which might not be related to news feed.