Prevent a UISearchDisplayController from hiding the navigation bar

后端 未结 15 1554
南方客
南方客 2020-11-27 11:59

Whenever a user begins editing a UISearchDisplayController\'s search bar, the search controller becomes active and hides the view\'s navigation bar while presen

15条回答
  •  清酒与你
    2020-11-27 12:29

    Tried this a different way, without subclassing UISearchDisplayController. In your UIViewController class where you set the delegate for UISearchDisplayController, implement searchDisplayControllerDidBeginSearch: and add use

    [self.navigationController setNavigationBarHidden:NO animated:YES];
    

    Did the trick for me, hope that helps.

提交回复
热议问题