主控制器是TABBARCONTROLLER;其中一个是navigationcontroller,然后在该navigationcontroller中是带有searchDisplayController的UitableView。

搜索栏在UitableView中。

enter image description here enter image description here enter image description here

但是,我不知道自己更改了什么(下次我应该使用Snapcapture ....)。我的搜索栏不见了。

我的意思是,在我的汇编之后,我在标签中找不到Seaerchbar。 (在我更改sth之前还可以; c,我已经改变了很多,我不能再加载了)

我已经打印了一个日志,例如[self.searchdisplayController描述

但这是无效的。

SBD可以建议我检查一些指示吗?谢谢

有帮助吗?

解决方案 2

我发现我的错是。

应该

@interface ThirdViewController : ***UIViewController*** 

不是

@interface ThirdViewController : ***UITableViewController*** 

UiviewController 从Uiresponder继承:nsobject

uitaiteViewCell 类从uiview:uiresponder:nsobject

我认为这就是为什么对于TableView,我无法显示搜索栏。因此,就我而言,我希望可以帮助他人不要做任何不必要的更改,例如我@@

并且请使用Snapcap

其他提示

在每个选项卡中,您需要仅添加一个导航控制器,在内部,您需要添加ViewController或TableView Controller或搜索Display ViewController。您需要以上述方式添加对象,我认为您没有以这种格式添加,从提供的图像中,只有一个选项卡,您添加了3个导航控制器。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top