Reputation: 613
I have a UITableView, displayed within a UINavigationController. I'm trying to change the color of the view under the table, so that when you pull down on the table you see something other than white.
I've tried both of these:
self.tableView.backgroundView.backgroundColor = [UIColor blackColor];
self.navigationController.view.backgroundColor = [UIColor blackColor];
Separately and together. Still seeing the white.
What am I missing?
Upvotes: 3
Views: 670
Reputation: 25740
self.tableView.backgroundView = nil;
self.tableView.backgroundView = [[UIView alloc] init];
self.tableView.backgroundView.backgroundColor = [UIColor blackColor];
Upvotes: 8