Search code examples
iosuitableviewios7uisearchdisplaycontroller

UISearchDisplayController overlapping original table view


I have a table view with a searchdisplayviewcontroller presented in a popoverviewcontroller in iOS 7...

Search Disabled

When the searchdisplay is active the results appear over the top of the original table view...

Search Active

How can I get the results to display correctly?

Now in iOS 6 it works perfectly, could it be a bug in iOS 7?


Solution

  • I faced the same issue. It probably is a bug.
    Probably occurs only when display on popover.
    See link below.

    https://devforums.apple.com/message/888704

    Workaround

    - (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView
    {
        tableView.backgroundColor = [UIColor whiteColor];
    }