We have a UITableView with searchbar with searchDisplayController .
We want transparency to be absent throughout the application.
I have transparency for the navigation bar and other bars, but not the search bar when it uses the display controller. In one part of the application, when we use the search bar, but not the display controller, transparency is set correctly.
How to set value of translucent property of UISearchBar with NO display controller?
EDIT: this is my code in viewDidLoad
self.navigationController.navigationBar.translucent = NO; BOOL t = self.searchDisplayController.searchBar.translucent; self.searchDisplayController.searchBar.translucent = NO; self.navigationController.navigationBar.barTintColor = [UIColor redColor]; self.searchDisplayController.searchBar.barTintColor = [UIColor redColor]; UIBarStyle b1 = self.searchDisplayController.searchBar.barStyle; UISearchBarStyle b2 = self.searchDisplayController.searchBar.searchBarStyle; BOOL t2 = self.searchDisplayController.searchBar.translucent;
Run in the debugger, t = YES and t2 = YES. b1 = UIBarStyleDefault and b2 = UISearchBarStyleDefault . Am I installing NO in the wrong place? Ive tried installing in storyboard and here in viewDidLoad
source share