How do I create a UISearchController since UISearchDisplayController is deprecated in iOS 8?

◇◆丶佛笑我妖孽 提交于 2019-12-10 11:36:03

问题


There is NO UISearchController in IB, only the UISearchDisplayController; where do I find docs on creating it?


回答1:


From documentation;

Important: UISearchDisplayController is deprecated in iOS 8. (Note that UISearchDisplayDelegate is also deprecated.) To manage the presentation of a search bar and display search results in iOS 8 and later, instead use UISearchController.

Read UISearchController documentation. There is an example how to create UISearchController, not in IB but programmatically.



来源:https://stackoverflow.com/questions/33711358/how-do-i-create-a-uisearchcontroller-since-uisearchdisplaycontroller-is-deprecat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!