How do I create a UISearchController since UISearc

2019-06-01 18:05发布

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

1条回答
Ridiculous、
2楼-- · 2019-06-01 18:46

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.

查看更多
登录 后发表回答