For the table view, you want to slide down the table view to refresh the data of the table view. Maybe you need to add the UIRefreshControl
to the TableView
.
You can use the UIRefreshControl
like this:
func addRefreshControl() {
refreshControl = UIRefreshControl()
refreshControl!.addTarget(self, action: "refreshTableView", forControlEvents: UIControlEvents.ValueChanged)
tableView.addSubview(refreshControl!)
}
func refreshTableView()
//Somthing like tableView.reloadData()
}
After reload the data, maybe the refresh view will not be disappeared. Try to end the refreshing of the UIRefreshControl use the code like this:
refreshControl?.endRefreshing()