title: How to use pull to refresh in Swift?
body: <p>I am building an RSS reader using swift and need to implement pull to reload functionality.</p>
  
  <p>Here is how i am trying to do it.</p>
  
  <pre><code>class FirstViewController: UIViewController,
      UITableViewDelegate, UITableViewDataSource {
  
     @IBOutlet var refresh: UIScreenEdgePanGestureRecognizer
     @IBOutlet var newsCollect: UITableView
  
     var activityIndicator:UIActivityIndicatorView? = nil
  
     override func viewDidLoad() {
         super.viewDidLoad()
         self.newsCollect.scrollEnabled = true
        // Do any additional setup after loading the view, typically from a nib.
  
        if nCollect.news.count &lt;= 2{
            self.collectNews()
         }
        else{
            self.removeActivityIndicator()
         }
        view.addGestureRecognizer(refresh)
     }
  
  
  
  @IBAction func reload(sender: UIScreenEdgePanGestureRecognizer) {
      nCollect.news = News[]()
      return newsCollect.reloadData()
  }
  </code></pre>
  
  <p>I am getting : </p>
  
  <blockquote>
    <p>Property 'self.refresh' not initialized at super.init call</p>
  </blockquote>
  
  <p>Please help me to understand the behaviour of Gesture recognisers. A working sample code will be a great help.</p>
  
  <p>Thanks.</p>