If your Deployment Target is set to iOS 7 and you wish to support iOS 8, you can still use UISearchDisplayController
and it should run without issue on iOS 8, and without warnings presented in Xcode. I have not experienced any misbehavior with my apps that implement UISearchDisplayController
. When I decide to no longer support iOS 7, then I will replace it completely with UISearchController
.
You may be able to detect the OS version and implement UISearchController
programmatically if 8+, but if you're using a Storyboard it would be difficult to implement both unless you create two different Storyboards, one for each OS. But I don't really find that necessary when you need to support the previous OS. Deprecation normally does not mean it will not work anymore when running on the latest OS, but rather it's just not recommended to use anymore because there are better solutions available. It's rare when deprecated methods do not work properly when run on newer iOS versions.