In iOS7, why selected cell's background color is always gray?

半城伤御伤魂 提交于 2019-12-22 11:08:14

问题


set cell.selectionStyle = UITableViewCellSelectionStyleBlue, or even manually set Blue in storyboard, but neither of them works.

if using setSelectedBackgroundView:, it may work.

But I really want to know why method of `[cell setSelectionStyle:] not work any more in iOS 7? Is it deprecated in iOS 7? If so, why no any waring in Xcode when typing?


回答1:


The method is not deprecated, and it still works—try setting a cell’s selectionStyle to UITableViewCellSelectionStyleNone, for instance. In iOS 7, though, the previous default—UITableViewCellSelectionStyleBlue—now looks like the new default, i.e. gray.



来源:https://stackoverflow.com/questions/19304410/in-ios7-why-selected-cells-background-color-is-always-gray

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