I currently have implemented a UISearchController which is currently working fine. Here are the attached screens that show how:
However, what I would like to do is implement it in a way that looks like how Apple implemented their language selection option in settings on the iPhone:
In Apple's implementation, the search bar does not hide the navigation bar when it is active. Does anyone know how to achieve this functionality in Swift instead of the conventional way which I have implemented currently? Just wondering.
Thanks in advance to all who reply.
There is a property called
hidesNavigationBarDuringPresentation in the
UISearchController class that by default is
true that handle what do you want, so put it in
false and you can achieve keep the navigation bar during the presentation as Apple do in the Language options:
searchbBarController.hidesNavigationBarDuringPresentation = false
I hope this help you