title: scrollViewDidEndDragging not called in UITableview when data is less
body: <p>I am using pagination to show manage multiple data. Pagination works on both sides top and bottom. For this, I am using below code to call API. But I have faced the issue when data is not greater then <code>tableView</code> height. In this case <code>scrollViewDidEndDragging</code> method not called. So please tell me how to solve this problem. below code is working fine when data is greater then <code>tableView</code> height.</p>
  
  <pre><code>func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
      if(scrollView.panGestureRecognizer.translation(in: scrollView.superview).y &gt; 0) {
          print("up")
          if workerInfo.count &gt; 0 {
              let topVisibleIndexPath:IndexPath = self.tableView.indexPathsForVisibleRows![0]
              if topVisibleIndexPath.row == 0 &amp;&amp; startCount != 0 &amp;&amp; !isDataLoading {
                  isDataLoading = true
                  startCount = startCount - requiredCount
                  self.callAPI(isCallFromPagination: true)
              }
           }
       }
       else {
           print("down")
           if workerInfo.count &gt; 0 {
               let arrayOfVisibleItems = tableView.indexPathsForVisibleRows?.sorted()
               let lastIndexPath = arrayOfVisibleItems!.last
               //  print("Array: ", arrayOfVisibleItems)
               print("Last IndexPath: ", lastIndexPath as Any)
               if lastIndexPath?.row == workerInfo.count - 1 &amp;&amp; !isDataLoading {
                   isDataLoading = true
                   startCount = startCount + requiredCount
                   self.callAPI(isCallFromPagination: true)
               }
           }
      }
  }
  </code></pre>