Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UISearchDisplayController is deprecated in iOS 8 but exists in object library Xcode

I drag the search bar and search display controller on to storyboard. And in the view controller, I am implementing the UISearchDisplay delegate. But it tells me it's deprecated in iOS 8. So, How do I add a search controller to storyboard and implement the delegate and datasource? Does it make sense?

Right now I am using the replacement: UISearchController. When the search display controller in object library will be replaced with UISearchController.

like image 656
yong ho Avatar asked Oct 31 '22 15:10

yong ho


1 Answers

You can't create UISearchController, which was introduced with iOS 8, via storyboard right now. Maybe in future versions of XCode.

So you have to create the UISearchController with Code. Checkout this example project from Apple.

like image 151
itinance Avatar answered Nov 15 '22 07:11

itinance