由于 UISearchDisplayController 在 iOS 8 中已弃用,我该如何创建 UISearchController?
How do I create a UISearchController since UISearchDisplayController is deprecated in iOS 8?
IB中没有UISearchController,只有UISearchDisplayController;我在哪里可以找到有关创建它的文档?
来自文档;
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.
阅读 UISearchController
文档。有一个如何创建 UISearchController
的示例,不是在 IB 中而是以编程方式创建。
IB中没有UISearchController,只有UISearchDisplayController;我在哪里可以找到有关创建它的文档?
来自文档;
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.
阅读 UISearchController
文档。有一个如何创建 UISearchController
的示例,不是在 IB 中而是以编程方式创建。