Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Group table view background color is deprecated in ios 6.0 [duplicate]

Possible Duplicate:
is groupTableViewBackgroundColor deprecated on iOS 6?

I am getting this warning on my storyboard in iOS 6. I would hover to see the replacement method, but since I'm viewing the storyboard it shows me nothing. How can I easily set the background color? Seems like I should be able to do this from the Interface Builder.

like image 814
Kyle Clegg Avatar asked Sep 22 '12 01:09

Kyle Clegg


3 Answers

Open your storyboard, check all views in the Attributes Inspector and change all views with Grouped Table View background color to any other color, I changed mine to white and all warnings went away.

attributes inspector

like image 147
Mhdali Avatar answered Nov 19 '22 12:11

Mhdali


In code you can set it using the following:

tableView.backgroundColor = [UIColor blueColor];
tableView.backgroundView = nil;
like image 42
SlateEntropy Avatar answered Nov 19 '22 13:11

SlateEntropy


I've noticed, that in iOS simulator the groupTableViewBackgroundColor is not shown in iOS 6 but in iOS 5. On a device with iOS 6 it still looks like in iOS 5. An interesting point is, that the simulator still shows the groupTableViewBackgroundColor in grouped tables, so I think it is just not allowed to use this color for other views than grouped table views in iOS 6.

like image 2
iCode Avatar answered Nov 19 '22 12:11

iCode