My viewController has a UISearchBar set as the header view of a UITableView.
self.tableView.tableHeaderView = self.searchBar;
In iOS7, pulling down beyond the UISearchBar reveals a white space that does not obey the dark color set using self.tableView.backgroundColor.
Is there a way to get rid of the white space?
I managed to get rid of that color by setting a table view background view.
UIView *backgroundView = [[UIView alloc] initWithFrame:self.tableView.bounds];
backgroundView.backgroundColor = [UIColor clearColor];
self.tableView.backgroundView = backgroundView;
As developers will likely struggle with the white background in the age of swift:
tableView.backgroundView = UIView()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With