UISearchDisplayController结果表与UISearchBar重叠

吉姆·杰弗斯(Jim Jeffers)

我的装置有一个奇怪的问题UISearchDisplayController当搜索显示激活背景衰落视图的框架时,和tableview会错误地重叠UISearchBar看来结果tableview未考虑的偏移量UIStatusBar

ViewController是使用auto layout由于应用程序不使用任何不透明的条,因此视图控制器不会扩展其任何边缘。

 Extend edges under top bars = NO, 
 under bottom bars = NO, and
 under opaque bars = NO.

这是初始布局:

初始布局

搜索显示激活时将发生以下情况:

激活的搜索

最后,这是搜索的结果输出:

搜索结果

吉姆·杰弗斯(Jim Jeffers)

I solved my own problem. A hard lesson learned. After a few hours of thinking "It really shouldn't be this hard." I realized that my instance of UISearchDisplayController was not properly linked to the API provided property of its parent view controller. If you're using UIStoryBoards / Interface Builder be sure to click on your ViewController and view its provided outlets in the inspector. If you see this:

缺少插座

Then something is wrong and you're going to run into issues just as I had. What you'll want to do is to click in that empty circle and drag to your instance of the Search Display Controller. If things are linked up right you should see this:

正确链接

我愚蠢地没有注意这一点,而是创建了自己的IBOutlet来引用搜索显示控制器。这导致IB取消了提供的API,因为UIViewController只能支持一个Search Display Controller。如果您需要我澄清任何事情,请告诉我。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

UISearchDisplayController重叠原始表视图

来自分类Dev

隐藏UISearchDisplayController的UISearchBar

来自分类Dev

UISearchBar和/或UISearchDisplayController颜色

来自分类Dev

UISearchBar和/或UISearchDisplayController颜色

来自分类Dev

如何使用UISearchBar和UISearchDisplayController

来自分类Dev

UISearchDisplayController显示结果解析

来自分类Dev

How to Show and Hide UISearchDisplayController's UISearchBar

来自分类Dev

如何显示和隐藏UISearchDisplayController的UISearchBar

来自分类Dev

UISearchControl之下的UIScrollView中的UISearchDisplayController UISearchBar动画

来自分类Dev

Objective-C - 滚动时 UISearchController 结果在 UISearchBar 上重叠

来自分类Dev

UISearchBar以编程方式-结果显示在“所有记录”表上

来自分类Dev

与iOS7中UITableView的标头中的UISearchDisplayController链接的UISearchBar

来自分类Dev

无法显示UISearchBar的结果

来自分类Dev

从UISearchDisplayController返回结果后可见额外的单元格

来自分类Dev

itextsharp columntext与表重叠

来自分类Dev

PostgreSQL表重叠计数

来自分类Dev

itextsharp columntext与表重叠

来自分类Dev

PostgreSQL表重叠计数

来自分类Dev

使表TD不重叠

来自分类Dev

处于活动状态时,UISearchBar与UITableView内容重叠

来自分类Dev

Swift:UISearchBar 中字典的多个结果

来自分类Dev

HTML CSS表行重叠

来自分类Dev

HTML表中的图像重叠

来自分类Dev

循环工作表时阻止表重叠

来自分类Dev

在弹出窗口中选择结果重叠

来自分类Dev

ggplot:position_dodge结果重叠?

来自分类Dev

不重叠日期的 SQL 分组结果

来自分类Dev

UISearchBar在搜索结果中显示多个节标题

来自分类Dev

自定义UISearchBar结果单元格

Related 相关文章

热门标签

归档