[英]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.