             self.nextPageURLString = nextPage
             self.isLoading = false
             
+            if(self.refreshControl != nil && self.refreshControl!.isRefreshing) {
+                self.refreshControl!.endRefreshing()
+            }
             guard result.error == nil else
             {
                 print(result.error!)


    override func viewWillAppear(_ animated: Bool) {
        self.clearsSelectionOnViewWillAppear = self.splitViewController!.isCollapsed
        super.viewWillAppear(animated)
        loadGists(urlToLoad: nextPageURLString)
        //GitHubAPIManager.sharedInstance.getStarredGistWithBasicAuth()
    }


            self.tableView.reloadData()
            
        }
    }
    
    func refresh(sender : AnyObject)
    {
        nextPageURLString = nil
        loadGists(urlToLoad: nil)
    }

}
