Jevon Cowell
Jevon Cowell

Reputation: 411

Disappearing Navigation Bar when typing into Search Bar

I have here a Menu with a Navigation Bar, Search & Scope Bar, and a table view:

Shows Scope BAr

The issue is that when I type into the search bar this happens:

Dissapering Navigation Bar

Any idea why this is happening and how I can fix it? I'm doing all of this in Stroyboard.

Upvotes: 2

Views: 947

Answers (2)

Rajat
Rajat

Reputation: 11127

You can do 2 things here,

1) If you don't want your UISearchController to animate over your navigation bar then you can set

yourSearchController.hidesNavigationBarDuringPresentation = false

2) You can set definesPresentationContext so that your search controller only will be on top.

self.definesPresentationContext = true

Upvotes: 2

Flipper
Flipper

Reputation: 1107

There's property on your UISearchController called hidesNavigationBarDuringPresentation. Just set it to false.

Upvotes: 0

Related Questions