I have a non-UITableViewController with searchBar and UISearchDisplayController, ios 7 targeted. When the searchBar is selected it animates to the top of screen and everything else is dimmed.
I used the next code to show the searchResultsTableView when the searchBar is still empty:
- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller
{
[self.searchDisplayController.searchResultsTableView setHidden:FALSE];
}
Now the ResultsTableView is displayed, with the right data ,but it is dimmed like everything else and the cells cant be selected. When trying to select a cell, the searchDisplayController dismisses.
How can i make it un-dimmed and selectable?
I am not getting your problem but as i think you need to remove dimmed view and if i understand correct then below code will help you
-(void) searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller
{
for(UIView * v in myDocSearchDisplayController.searchContentsController.view.subviews)
{
if([v isMemberOfClass:[UIControl class]] || ([[[v class] description] isEqualToString:@"UISearchDisplayControllerContainerView"]))
{
[v removeFromSuperview];
}
}
}