13

When a UISearchController's search bar becomes active, it hides the view's navigation bar. I'd like to have the search bar active below the navigation bar.

In iOS 7 there was a good way to do this for UISearchDisplayController here: https://stackoverflow.com/a/12529945/3799720

But now in iOS 8 with UISearchController I can't figure out how to do this.

Community
  • 1
  • 1
MaxB
  • 215
  • 3
  • 10

2 Answers2

50

This might have something to do with the UISearchController hidesNavigationBarDuringPresentation property.

matt
  • 515,959
  • 87
  • 875
  • 1,141
2
yourSearchController.hidesNavigationBarDuringPresentation = false

this works in swift

Boris Nikolic
  • 746
  • 14
  • 24