 class AddSamplesTableViewController: UITableViewController {
 
     var type:AnimatorType = .Default
-    var items = 20  
+    var items = 5
     
     override func viewDidLoad() {
         super.viewDidLoad()

                self?.tableView?.endInfiniteScrolling()
            }
        })
    }

    override func didReceiveMemoryWarning() {

        }
    }
    func addPullToRefreshWithAnimator(animator: CustomPullToRefreshAnimator) {
        tableView.addPullToRefresh(animator: animator, action: { [unowned self] () -> Void in
            DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
                print("end refreshing")
                
                self.items += 3
                self.tableView.reloadData()
                self.tableView?.endRefreshing()
                
                if self.items < 12 {
                    self.tableView.enableInfiniteScroll = false
                } else {
                    self.tableView.enableInfiniteScroll = true
                }
            }
        })
    }
