Reputation: 1962
On an iPad View, I added a UITableView object, set its Style to Grouped, and the Background is set to Clear Color. Running the app on the simulator, I can see that the Background that I chose was not applied. (The background is still the default grayish color). I applied other colors but same thing happens. Even on the xib file, I can't see that the background color changes. Why is the background color not taking effect on my UITableView object? I'm currently using Xcode 4.3. Is this a bug on this version?
Note: This is working on iPhone.
Upvotes: 1
Views: 402
Reputation: 1384
You need to set the backgroundView
instead of the backgroundColor
on the table view, like this:
- (void)viewDidLoad { self.tableView.backgroundView = [[UIView alloc] init]; self.tableView.backgroundView.backgroundColor = ...; }
Upvotes: 1