Reputation: 940
I use this code to add UISearchController:
self.searchController.obscuresBackgroundDuringPresentation = YES;
self.searchController.hidesNavigationBarDuringPresentation = YES;
self.searchController.searchBar.searchBarStyle = UISearchBarStyleDefault;
self.navigationItem.searchController = self.searchController;
self.navigationItem.hidesSearchBarWhenScrolling = NO;
I see that sometimes while transition between views when searchBar goes upwards dark background appears underneath. I tried many things but can't figure out why it's happens. Any idea why it happens?
Thanks
Upvotes: 0
Views: 168
Reputation: 458
I also encountered this problem recently. Check the background color
of the navigation controller
your view controller is embedded in. Is should be the same color as bar tint color, of the color of your view controller's background view. Anything but clear color. Hope it helps.
Upvotes: 1