I came across a strange scenario, I used the search bar in my application and associated it with a table view, as shown in the figure below.

But when I try to find something, the search bar slides and hides in the navigation bar, I used the search bar several times and never saw me look like the one shown below on the screen.

I can’t remove the navigation bar because I need it, but I just can’t understand why and how this can happen,
It should be noted that the search bar and controller work fine when they try to perform a search, and only it is hidden behind the navigation bar,
Any help on this would be appreciated as I simply cannot understand its cause.
source share