Question

I've tried playing around with this a bit but have been unable to get what I want. I found a question online too without an answer asking the exact same question.

When search bar is enabled UISearchDisplayController greys out everything under the search bar and above the keyboard -- leaving my 'table' underneath looking kind of ugly...

How can I remove the grey-out effect?

Was it helpful?

Solution

I added this code:

- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller {

    for (UIView *v in [[[controller.searchResultsTableView superview] superview] subviews]) {

        if (v.frame.origin.y == 64) {
            [v setHidden:YES];
        }
    }

}

and it works but it removes some other functionality, like cancel search by clicking on tableview....but it's better than nothing...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top