0

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?

Nithin Michael
  • 2,166
  • 11
  • 32
  • 56
Mou某
  • 556
  • 3
  • 10
  • 32

1 Answers1

0

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...

Mou某
  • 556
  • 3
  • 10
  • 32
  • Not that I think this is a terribly good idea, but couldn't you keep that cancel functionality by just setting the view alpha to some really low number instead of hiding it? – Craig McMahon Aug 11 '14 at 11:33