title: tableview cell has wrong background layer after reuse
body: <p>I have a UIView extension which makes a gradient background from two colours. I use this so I add a nice background to my custom tableView cells. But after the reuse, the colour is always wrong (unlike the data inside which is correct). It's not like a plain background colour, and all colors depend on the value from the fetched data. After reuse, the background is always random from the previously generated cells (and their backgrounds).</p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "tableViewCell", for: indexPath) as! TableViewCell
  
      var imgTitle = ""
      var color = UIColor()
      let title = fetchedUV[indexPath.row].value
      if title &gt;  11 {
          imgTitle = "flame"
          color = UIColor.purple
          cell.setGradientBackground(colorOne: .white, colorTwo: color)
      } else if title &gt;= 8 {
          imgTitle = "sun-protection"
          color = UIColor.red
          cell.setGradientBackground(colorOne: .white, colorTwo: color)
      } else if title &gt;= 6 {
          imgTitle = "sunbed"
          color = UIColor.orange
          cell.setGradientBackground(colorOne: .white, colorTwo: color)
      } else if title &gt;= 3 {
          imgTitle = "sunglasses"
          color = UIColor.yellow
          cell.setGradientBackground(colorOne: .white, colorTwo: color)
      } else {
          imgTitle = "ok"
          color = UIColor.green
          cell.setGradientBackground(colorOne: .white, colorTwo: color)
      }
  
      colors.append(color)
      let UVValue = String(describing: title)
  
      cell.backgroundColor = UIColor.orange
      cell.commonInit(imgTitle, title: UVValue, time: fetchedUV[indexPath.row].dateIso)
  
      cell.logoImage.layer.cornerRadius = (cell.frame.height) / 2
      cell.layer.cornerRadius = cell.frame.height/2
  
  
      cell.layer.masksToBounds = true
      //cell.setGradientBackground(colorOne: .white, colorTwo: color)
  
      return cell
  }
  
  extension UIView {
      func setGradientBackground(colorOne: UIColor, colorTwo: UIColor) {
          let gradientLayer = CAGradientLayer()
          gradientLayer.frame = bounds
          gradientLayer.colors = [colorOne.cgColor, colorTwo.cgColor]
          gradientLayer.locations = [0.0, 1.0]
          gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.0)
          gradientLayer.endPoint = CGPoint(x: 1.0, y: 1.0)
          layer.insertSublayer(gradientLayer, at: 0)
      }
  }
  </code></pre>