S1U
S1U

Reputation: 825

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

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?

Upvotes: 3

Views: 2589

Answers (1)

Noah Witherspoon
Noah Witherspoon

Reputation: 57139

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.

Upvotes: 5

Related Questions