简体   繁体   English

单击取消按钮时,搜索显示控制器消失

[英]Search display controller disappears on multiple clicks on cancel button

I have a UITableView in which i have added UISearchDisplayController on the header of the table view in xib. 我有一个UITableView,其中我在xib的表视图的标题上添加了UISearchDisplayController。 When i run the project and click on search bar textfield which show cancel button. 当我运行该项目并单击显示取消按钮的搜索栏文本字段时。 When i click on cancel button multiple times frequently then UISearchBar is disappear from the header of the table view. 当我多次单击“取消”按钮时,UISearchBar从表视图的标题中消失。 You can download the sample app from below url. 您可以从以下网址下载示例应用程序。

https://www.dropbox.com/s/3ero6u76dceq4r7/SearchBarSample.zip?dl=0 https://www.dropbox.com/s/3ero6u76dceq4r7/SearchBarSample.zip?dl=0

Any help is much appreciated. 任何帮助深表感谢。 Thanks! 谢谢!

You have taken the search bar inside tableview. 您已在tableview中使用了搜索栏。 Just take it out of the tableview. 只需将其从tableview中取出即可。 Search bar should be above in list. 搜索栏应在列表上方。 The problem will be resolved. 该问题将得到解决。 enter image description here 在此处输入图片说明

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

相关问题 搜索显示控制器是否可以在搜索文本字段为空时隐藏取消按钮? - Search display controller prevent hiding the cancel button if the search text field is empty? iOS:使用搜索控制器后,重新出现已删除的取消按钮 - iOS: Removed cancel button reappears after using search controller 搜索栏取消按钮按下初始视图控制器 - search bar cancel button push to initial view controller 使用“搜索栏”取消按钮关闭模态视图控制器 - Dismissing a modal view controller with Search Bar cancel button 如何使用按钮显示“搜索显示控制器” - How to show “Search Display Controller” using a button 如果用户单击单个视图控制器内的按钮,是否可以显示其他textField? - Is there a way to display additional textFields if a user clicks on a button inside a single view controller? 删除appcelerator搜索中的“取消”按钮 - remove cancel button in appcelerator search 单击搜索栏上的取消按钮时,如何弹出自视图控制器? - How to pop self view controller when I click the cancel button at the search bar? UIImagePickercontroller取消按钮在iPad中不显示 - UIImagePickercontroller cancel button not display in iPad 取消按钮而不是导航控制器中的后退按钮 - Cancel button instead of a back button in Navigation Controller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM