0

I'm making an app with a multiple cell selection (I use checkmark) like this

enter image description here

The problem is that when I click on a cell, it remains gray and is really bad. How can I fix it?

shallowThought
  • 19,212
  • 9
  • 65
  • 112
Luca tom
  • 29
  • 7

3 Answers3

4

If you do not want to show grey selection at all:

  • Select the UITableViewCell in Storyboard
  • In Inspector, set selected to none

You can find more options to set it programatically in this answer.

shallowThought
  • 19,212
  • 9
  • 65
  • 112
1

try this code at didSelectRowAt#

cell.selectionStyle = UITableViewCellSelectionStyleNone
JBR
  • 136
  • 9
0

You can use this:

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    tableView.deselectRowAtIndexPath(indexPath, animated: true)
}

or

cell.selectionStyle = UITableViewCellSelectionStyle.None
A R
  • 1,412
  • 2
  • 14
  • 29