Navigation bar hides when UISearchbar cancel button is clicked

Problem with navigation bar. Scenario -

After a successful search, I clicked on the result / cell as a table and went to the next screen for details of the search results, returning to the search results screen by clicking on the cancel button. It resets the UISearchBar but hides the navigation bar.

  • Before searching

This is navigation bar state before search

  1. On clicking the search bar

navigation bar state after tap on search bar

  1. Returning from the details screen to the search results screen (the navigation bar is hidden)

Here navigation bar gets hidden when coming back to search results screen

I tried

self.navigationController.navigationBar.hidden = NO;

      

in

searchBarCancelButtonClicked:(UISearchBar *)searchBar

      

but no luck.

+3


source to share





All Articles