Can't push view controller when i use UISearchController
I have UISearchcontroller
. When I select the desired item and trying to click viewcontroller
, viewcontroller
do not press. The reason for this question is set self.definespresentationcontext
to NO
. Its working if I set self.definespresentationcontext
to YES
but hidden search strings are hidden.
Example:
self.searchResultController = [[MyResultsController alloc]init];
self.searchResultController.delegate = self;
self.searchController = [[UISearchController alloc] initWithSearchResultsController:self.searchResultController];
self.searchController.delegate = self;
self.searchController.hidesNavigationBarDuringPresentation = NO;
self.searchController.searchBar.delegate = self;
self.searchController.searchBar.showsCancelButton = YES;
self.searchController.searchBar.translucent = YES;
[self.searchController.searchBar sizeToFit];
self.definesPresentationContext = NO;
Can anyone help me to solve this problem? Thanks in advance.
+3
source to share