What good is Search Bar with Search Display Controller if UISearchDisplayController is deprecated?

49 views Asked by At

In the Xcode Library, there is a Search Bar control and a Search Bar with Search Display Controller control. UISearchDisplayController was deprecated in iOS 8. What good is Search Bar with Search Display Controller now? It must be included in the Library still for a purpose. How do I decide which one to use -- the Search Bar without or with Search Display Controller?

1

There are 1 answers

0
matt On

You may be using an outmoded version of Xcode. UISearchDisplayController is not present in the most recent version of Xcode. If you want to do a structured search, where clicking in a search bar causes a table or collection view to appear displaying search results, use UISearchController, which is available only in code. But nothing prevents you from using a search bar on its own, without a UISearchController, and dealing with it in any way you like, so of course it needs to be in the library: it's a built-in interface object like any other.