Search code examples
iosuinavigationcontrolleruisearchbaruisearchcontrollerios9.1

Do I really need a navigation controller?


I have an existing app (XCode 7.1, Storyboards, Objective-C) that has a UITabController set as the initial View Controller , which manages 4 other ViewControllers, one UITableVC, and three UIViewVCs.

I am trying to add a UISearchBar and UISearchDisplayController; all of the tutorials tell me that I need a UINavigationController. Since my app is working fine without one for all these years (3+), I don't see why I need it for the search function.

Can someone validate this for me: do I need a UINavigationController or not?


Solution

  • For iOS 9.1, you should be using UISearchController, not UISearchDisplayController, and no, you don't need a navigation controller.