title: how to add swipe and header view to uiTableView controller.?
body: <p><a href="https://i.stack.imgur.com/GtKMA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GtKMA.jpg" alt="this the first screenshort"></a></p>
  
  <p><a href="https://i.stack.imgur.com/k1t1J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k1t1J.jpg" alt="enter image description here"></a></p>
  
  <p>I have added one header view and swipe left to table view controller .</p>
  
  <p>As u can see in screenshot when i swipe the row then the header view is also moving please help me.</p>
  
  <p>my code to add header is </p>
  
  <pre><code>     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
  
              let header = tableView.dequeueReusableCell(withIdentifier: "HeaderCell") as! CustomHeaderTableViewCell
  
              header.SortButton?.backgroundColor = UIColor(netHex:0xEEEEEE)
              header.FilterButton?.backgroundColor = UIColor(netHex:0xEEEEEE)
  
              header.SortButton?.font = UIFont.fontAwesome(ofSize: 18)
              header.SortButton?.text = String.fontAwesomeIcon(name: .sort) + " Sort"
  
              header.FilterButton?.font = UIFont.fontAwesome(ofSize: 18)
              header.FilterButton?.text = String.fontAwesomeIcon(name: .filter) + " Filter"
  
              return header
  
          }
  
  
  
   func tableView(_ tableView: UITableView, editActionsForRowAt: IndexPath) -&gt; [UITableViewRowAction]? {
          let more = UITableViewRowAction(style: .normal, title: "More") { action, index in
              print("more button tapped")
          }
          more.backgroundColor = .lightGray
  
          let favorite = UITableViewRowAction(style: .normal, title: "Favorite") { action, index in
              print("favorite button tapped")
          }
          favorite.backgroundColor = .orange
  
          let share = UITableViewRowAction(style: .normal, title: "Share") { action, index in
              print("share button tapped")
          }
          share.backgroundColor = .blue
  
          return [share, favorite, more]
      }
  
       func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -&gt; Bool {
          return true
      }
  
      func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
          searchBar.endEditing(true)
  
          let translation = scrollView.panGestureRecognizer.translation(in: scrollView.superview)
  
          if(translation.y &gt; 0)
          {
              // react to dragging down
          } else
          {
              // react to dragging up
          }
      }
  </code></pre>
  
  <p>can please help me to solve the problem of swipe .</p>
  
  <p>and one more thing can I hide the header view on scroll .</p>