简体   繁体   English

在搜索结果TableView中选择行后,UISearchBar消失

[英]UISearchBar disappears after selecting row in search results TableView

Does anyone know why my UISearchbar is disappearing after a user taps on a cell in the search results table? 有人知道为什么我的UISearchbar在用户点击搜索结果表中的单元格后消失了吗? What happens is a user taps a cell after searching for something, which then opens a new view. 发生的事情是用户在搜索某个内容后点击一个单元格,然后打开一个新视图。 However, when you return back to the original search view controller, the search bar is gone and the top cell is under the top bar. 但是,当您返回到原始搜索视图控制器时,搜索栏消失,顶部单元格位于顶部栏下方。

To solve this, I had to dismiss the search results tableview after a cell was pressed. 为了解决这个问题,我必须在按下单元格后关闭搜索结果tableview。 Therefore, when the user returned back to the previous view, the search results were dismissed and the original tableview appeared again. 因此,当用户返回到上一个视图时,搜索结果被解除,原始的tableview再次出现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM