title: Set gradient behind UITableView
body: <p>I have created a tableViewController where I'm calling this function:</p>
  <pre><code>func setTableViewBackgroundGradient(sender: UITableViewController ,let topColor:UIColor, let bottomColor:UIColor){
  
      let gradientBackgroundColors = [topColor.CGColor, bottomColor.CGColor]
      let gradientLocations = [0.0,1.0]
  
      let gradientLayer = CAGradientLayer()
      gradientLayer.colors = gradientBackgroundColors
      gradientLayer.locations = gradientLocations
  
      gradientLayer.frame = sender.tableView.bounds
      sender.tableView.backgroundView?.layer.insertSublayer(gradientLayer, atIndex: 0)
  
  }
  </code></pre>
  <p>with:</p>
  <pre><code>setTableViewBackgroundGradient(self, UIColor(0xF47434), UIColor(0xEE3965))
  </code></pre>
  <p>but all I get is this:</p>
  <img src="https://i.stack.imgur.com/37P3d.jpg" height="500">