Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISearchController with nil searchResultsController

I am using UISearchController with UITableView, and using same table view on my base view controller to display the search results (doing with not specifying a seperate search results controller as searchController = UISearchController(searchResultsController: nil) ).

However, despite setting searchResultsController as nil, an empty transparent _UISearchControllerView is still being presenting on top of my view controller when search is active.

Is there a way to prevent this and keep my view controller on the top of the view controller hiearchy on search?

Thanks.

like image 588
Onur Avatar asked Jun 18 '16 13:06

Onur


1 Answers

You can remove that by setting the dimsBackgroundDuringPresentation property of search controller to false

searchController.dimsBackgroundDuringPresentation = false
like image 63
Praveen Gowda I V Avatar answered Nov 11 '22 10:11

Praveen Gowda I V