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

会有一股神秘感。 提交于 2019-12-03 07:10:03

问题


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.


回答1:


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.




回答2:


In code you can set it using the following:

tableView.backgroundColor = [UIColor blueColor];
tableView.backgroundView = nil;



回答3:


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.



来源:https://stackoverflow.com/questions/12539861/group-table-view-background-color-is-deprecated-in-ios-6-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!