UISearchDisplayController deprecated in iOS 8, but exists in the Xcode object library

I drag the search bar and display controller onto the storyboard panel. And in the view controller, I implement the UISearchDisplay delegate. But he tells me that it is deprecated in iOS 8. So, how do I add a search controller to the storyboard and implement the delegate and data source? Does it make sense?

I am currently using the replacement: UISearchController. When the search display controller in the object library will be replaced by a UISearchController.

+5
source share
1 answer

You cannot create a UISearchController that was introduced with iOS 8 through the storyboard right now. Perhaps in future versions of Xcode.

So you need to create a UISearchController with code. Checkout an example project from Apple .

+2
source

Source: https://habr.com/ru/post/1204896/


All Articles