I have seen the following questions, but non explain that while you can simply set cell.SelectedStyle
to UITableViewCellSelectionStyleGray
or
Your not going to like the answer then. As of iOS 7, setting
cell.selectionStyle = UITableViewCellselectionStyleBlue;
will now give you gray. Apple got rid of it in iOS 7, so now selectionStyleBlue no longer exists as blue.. it is gray.
Here is the quote from Apple's Documentation of the UITableViewCell Class Reference:
- Blue
The cell has a default background color when selected.
In iOS 7, the selection color is no longer blue. Use UITableViewCellSelectionStyleDefault instead.
Available in iOS 2.0 and later.
Of course, as I'm sure you have found, you can create a UIView and set it as the background to simulate a blue selection.
Here is a link for that approach: UITableView cell blue highlight on selection
Edit:
Just to be clear. UITableViewCellSelectionStyleBlue makes the selection style gray.
There is no default method of UITableViewCell that makes selection style a blue color.
In order to make selection style any color other than the default gray, you have to create a custom UIView like in the link I provided.