Reputation: 1514
I have a ViewController with a Navigation Controller before it, that has a TableView and other elements inside. The tableView has also a Search Bar, and in the scene, besides the main ViewController I have a Search Display Controller.
The functionality is working, but I have the following UI issues:
I also have the following initial setup for UI
-(void) viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
self.view.backgroundColor = [UIColor blackColor];
self.tableView.backgroundColor = [UIColor blackColor];
self.searchDisplayController.searchResultsTableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
self.searchDisplayController.searchResultsTableView.separatorColor = [UIColor blackColor];
self.searchDisplayController.searchResultsTableView.separatorInset = UIEdgeInsetsMake(0, 12, 0, 12);
[self.searchDisplayController.searchResultsTableView setBackgroundColor:[UIColor blackColor]];
[self.searchDisplayController.searchContentsController.view setBackgroundColor:[UIColor blackColor]];
self.searchDisplayController.searchBar.barStyle = UIBarStyleBlack;
self.searchDisplayController.displaysSearchBarInNavigationBar = NO;
}
Any ideas how can I fix this :(?
Edit update: Both were solved removing the Search Bar from the TableView. After this another issue came that the animation of Search Display Controller wasn't updating the Search Bar. this was solved with the following post: UISearchBar animation issue
Upvotes: 2
Views: 82
Reputation: 6940
UIView
background color to black (not just UITableView
color).UISearchBar
, you can do this either programmatically or via IB. I recommend second option. Pretty easy.Upvotes: 2