title: Change view background gradient color with smooth animation while scrolling in tableView with multiple section
body: <blockquote>
    <p>I have multiple section in my UITableView, i want to change my View
    back ground color as gradient color with smooth transition while
    scrolling tableView.</p>
    
    <p>when new section comes in tableView change view background color
    smoothly.</p>
  </blockquote>
  
  <p><strong>How can i achieve this kind of Animation.?</strong></p>
  
  <blockquote>
    <p>My Code is below for change the background color but not smoothly</p>
  </blockquote>
  
  <pre><code>func tableView(_ tableView: UITableView, willDisplayHeaderView view: UIView, forSection section: Int) {
          switch section {
          case 0:
                  self.view.backgroundColor = UIColor.cyan
              break
          case 1:
                 self.view.backgroundColor = UIColor.red
              break
          case 2:
                 self.view.backgroundColor = UIColor.green
              break
          case 3:
                 self.view.backgroundColor = UIColor.blue
              break
          case 4:
                 self.view.backgroundColor = UIColor.brown
              break
          default:
                self.view.backgroundColor = UIColor.brown
              break
          }
      }
  </code></pre>