Skip to content

Instantly share code, notes, and snippets.

@rockarts
Created February 20, 2017 17:24
Show Gist options
  • Select an option

  • Save rockarts/fa52efd6f6d61d48dd591cc6cd8947c4 to your computer and use it in GitHub Desktop.

Select an option

Save rockarts/fa52efd6f6d61d48dd591cc6cd8947c4 to your computer and use it in GitHub Desktop.
func loadTable() {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
//Add your long running task to get the table data here
dispatch_async(dispatch_get_main_queue()) {
self.indicator.stopAnimating()
self.indicator.hidesWhenStopped = true
self.tableView.reloadData()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment