Background color for UISearchController in UITableView Background color for UISearchController in UITableView ios ios

Background color for UISearchController in UITableView


Set the UITableView's backgroundView to a new useless view:

    self.tableView.backgroundView = [UIView new];

Seems illogical, but works like a charm :)


Cameron E's correct answer in Swift:

tableView.backgroundView = UIView()

Note that self.tableView.backgroundView = nil does not work.


Try this:

[searchController.searchBar setBarTintColor:[UIColor blackColor]];[searchController.searchBar setTintColor:[UIColor whiteColor]];

Hope this helps.