Search code examples
ios6

uitableview setbackgroundcolor not setting the color in UITableViewStyleGrouped table


in iOS 6

[uitableview setBackgroundColor:] not setting the color when table style is UITableViewStyleGrouped

instead the default striped background is seen.

How should we set the background of the table if the style is UITableViewStyleGrouped


Solution

  • self.view.backgroundColor = TTSTYLEVAR(mainPageBackground);
    self.tableView.separatorColor   = TTSTYLEVAR(mainPageBackground);
    self.tableView.backgroundView = nil;
    

    Fixed it for me. You'll have to be careful of what other impacts this might have though.