UITableView separator color changing when cell selected
<p>I've created a UITableView and have a problem with the separator. I customized it so that it appears gray and without inset :</p>

<pre><code>self.tableView.separatorInset = .zero
self.tableView.separatorColor = AppColors.separatorColor
</code></pre>

<p>I also tried with an image :</p>

<pre><code>self.tableView.separatorInset = .zero
tableView.separatorStyle = UITableViewCellSeparatorStyle.singleLine
tableView.separatorColor = UIColor(patternImage: #imageLiteral(resourceName: "thin_divider"))
</code></pre>

<p><strong>Problem</strong> : When a row is selected, the separator becomes white. I played with <strong>didSelectRowAt</strong>, <strong>didDeselectRowAt</strong> and <strong>didHighlightRowAt</strong> but nothing to do, it stays white when the cell is selected. See the example below (last cell is selected on this example)...</p>

<p><img src="https://i.stack.imgur.com/EcPFmm.png" alt="example of the problem"></p>