Lessons learned from eaGeier #5

Setting Background Color of Table Views

While setting the background color of a table view in grouped style works on the iPhone as intended, it does not show on the iPad:

        self.tableView.backgroundColor = [UIColor yellowColor];



In addition a background view has to be initialized using the same color:

        self.tableView.backgroundView = [[UIView alloc] init];
        self.tableView.backgroundView.backgroundColor = self.tableView.backgroundColor;
adjusted for iPad

Leave a Reply

Your email address will not be published.