天天看点

ios7适配--uitableviewcell选中效果ios7 UITableViewCell selectionStyle won't go back to blue

ios7适配--uitableviewcell选中效果ios7 UITableViewCell selectionStyle won't go back to blue

2

Xcode 5.0, iOS 7 and updating an existing app. <code>UITableView</code> selected row is now gray, not blue.

From what I've read they changed the default <code>selectionStyle</code> to gray. But "Blue" is still an option in IB and <code>UITableViewCellSelectionStyleBlue</code> still exists. Checking out the new HIG, it doesn't look like they removed the blue and the "Settings" app still using blue cell selection.

I've tried setting the value in IB and in code, but no luck. Any ideas on what I need to do to get the blue selection style back?

asked Sep 13 at 19:45

<a href="http://stackoverflow.com/users/584485/dbd">DBD</a>

4,12011544

<a href="http://stackoverflow.com/questions/18794080/ios7-uitableviewcell-selectionstyle-wont-go-back-to-blue">add comment</a>

<a></a>

There is only one selectionStyle in iOS7, to change you need to do this manually like below:

<a href="http://stackoverflow.com/posts/18799787/revisions">edited Sep 19 at 15:41</a>

answered Sep 14 at 8:20

<a href="http://stackoverflow.com/users/1262634/null">null</a>

2,98211128

ios7适配--uitableviewcell选中效果ios7 UITableViewCell selectionStyle won't go back to blue

Probably it could help you. I have my custom cell and to make it selected with needed color I have overwrite setHighlighted and setSelected now it's look like that

answered Sep 22 at 9:04

<a href="http://stackoverflow.com/users/1810564/max-tymchii">Max Tymchii</a>

10616

欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!

本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/p/3342246.html,如需转载请自行联系原作者