title: Detect when tableView is at the bottom lagging
body: <p>I've created a tableView which is hooked up to a api. i'm trying to implement a load more functionality where it make a new api call when you reach the bottom of the tableView. i've created this functionality, but when there is not anymore objects in the api/json file. it seem to be very laggy when i reach the bottom how come is that?</p>
  
  <p>detecting when i'm at the bottom at the screen and doing a api call</p>
  
  <pre><code>func scrollViewDidScroll(scrollView: UIScrollView!) {
  
  
  
      var height = scrollView.frame.size.height;
      var contentYoffset = scrollView.contentOffset.y;
      var distanceFromBottom = scrollView.contentSize.height - contentYoffset;
  
      if distanceFromBottom &lt; height
      {
          if isApiCalling == false {
              getRecent("URL/recent.php?lastid=\(lastObjectIndex)&amp;limit=\(numberOfRecordsPerAPICall)")
              self.tableVIew.reloadData()
          }
      }
  }
  </code></pre>
  
  <p>GetRecent function. i've even created a isAPICalling variable, which makes sure that it does not run the api several times.</p>
  
  <pre><code>func getRecent(url: NSString) {
  
      isApiCalling = true
      let recentUrl = NSURL(string: url as String)
      var recentRequest = NSURLRequest(URL: recentUrl!)
      var recentData = NSURLConnection.sendSynchronousRequest(recentRequest, returningResponse: nil, error: nil)
  
      let jsonArray = JSON(data: recentData!)
      for (key: String, subJson: JSON) in jsonArray {
          // Create an object and parse your JSON one by one to append it to your array
          var newNewsObject = News(id: subJson["id"].intValue, title: subJson["title"].stringValue, link: subJson["url"].stringValue, imageLink: subJson["image_url"].stringValue, summary: subJson["news_text"].stringValue, date: getDate(subJson["date"].stringValue))
  
  
  
          recentArray.append(newNewsObject)
      }
  
      lastObjectIndex = lastObjectIndex + numberOfRecordsPerAPICall
      isApiCalling = false
  
  
  }
  </code></pre>