iOS 7 UISearchDisplayController在搜索数据时不清除背景 [英] iOS 7 UISearchDisplayController not cleaning background when search data

查看:136
本文介绍了iOS 7 UISearchDisplayController在搜索数据时不清除背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的应用程序升级到iOS 7.实际上我对UISearchDisplayController存在很大问题。

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

如果我将它显示在PopUp中直到我没有启动搜索它工作正常,但当我在SearchBar中插入一些东西时,搜索工作正常,但我看到了搜索结果与旧内容重叠。

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.

在iOS 6中,一切正常。以下是显示问题的示例项目的链接。
示例项目

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

此帖子附有两张图片。

感谢您的帮助。

推荐答案

似乎像单元格的背景颜色是清晰的颜色,表格视图也是如此。您可以实现搜索显示控制器的委托方法 searchDisplayController:didLoadSearchResultsTableView:并将背景颜色设置为您需要的颜色(但不是 [UIColor clearColor] )。或者将单元格的背景颜色更改为不透明的颜色。

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.

这篇关于iOS 7 UISearchDisplayController在搜索数据时不清除背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆