Skip to content

Instantly share code, notes, and snippets.

@piyushdec
Last active July 28, 2019 20:01
Show Gist options
  • Save piyushdec/10dfeca3b95b988443ab7d253d79beed to your computer and use it in GitHub Desktop.
Save piyushdec/10dfeca3b95b988443ab7d253d79beed to your computer and use it in GitHub Desktop.
func fetchImageDataSource() {
let request = URLRequest(url: "https://your-server-url-to-fetch-endpoints")
let task = URLSession(configuration: .default).dataTask(with: request) { data, response, error in
self.imagesRecord.append(record0...<recordn)
DispatchQueue.main.async {
self.tableView.reloadData()
}
}
task.resume()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment