iOS 7 UISearchDisplayController not cleaning backg

2019-08-06 11:00发布

问题:

I'm upgrading my Apps to iOS 7. Actually I have a big issue with UISearchDisplayController.

If i display it into a PopUp until I don't start a Search it works fine, but when I insert something into the SearchBar the search works fine, but I see the search result overlapped to the old contents.

In iOS 6 it all works fine. Here is a link to an example project which shows the problem. Example project

Attached to this post there are two images.

Thank you for your help.

回答1:

Seems like the cell's background color is clear color, and so is the table view's. You can either implement the search display controller's delegate method searchDisplayController:didLoadSearchResultsTableView: and set the background color to what you need (but not [UIColor clearColor]). Or change your cells' background color to be an opaque color.