title: RefreshControl doesn't hide
body: <p>My refresh control doesn't disappear after the refresh progress is done. It remains animating, even though I call endRefreshing().</p>
  
  <pre><code>import UIKit
  
  class MyTableViewController: UITableViewController {
      override func viewDidLoad() {
          super.viewDidLoad()
  
          refreshControl = UIRefreshControl()
          refreshControl?.attributedTitle = NSAttributedString(string: "Pull to refresh")
          refreshControl?.addTarget(self, action: #selector(self.refresh), for: UIControlEvents.valueChanged)
          tableView.addSubview(refreshControl!)
  
          setData()
      }
  
      func setData(){
          ApiClient.sharedInstance().getData{(myData, error) in
              if (myData != nil){
                  DispatchQueue.main.async {
                      self.myLabel.text = myData
                      self.refreshControl?.endRefreshing()
                  }
              }
  
              if (error != nil){
                  print(error)
              }
          }
      }
  
      func refresh(sender:AnyObject) {
          setData()
      }
  
  }
  </code></pre>
  
  <p>Can you help me?</p>