Skip to content

Instantly share code, notes, and snippets.

View shanecowherd's full-sized avatar

Shane Cowherd shanecowherd

  • Cowherd.com, Making Blocks, PBSCO, Bulb, BombBomb, Echo1612
  • Colorado Springs
  • 02:26 (UTC -06:00)
View GitHub Profile
//https://developer.apple.com/documentation/foundation/urlsession/1411511-downloadtask
let url = URL(string: "https://www.shanecowherd.com")!
let downloadTask = URLSession.shared.downloadTask(with: url) { (downloadedFile, response, error) in
// Make sure the temporary file exists and you have access to it
guard let downloadedFile = downloadedFile, FileManager.default.fileExists(atPath: downloadedFile.path) else {
return
}
@shanecowherd
shanecowherd / ImageCachingService.swift
Created December 20, 2017 20:12 — forked from tjbarber/ImageCachingService.swift
Simple Image Caching Service Version 00000001
//
// ImageCachingService.swift
// Exuberant
//
// Created by TJ Barber on 12/20/17.
// Copyright © 2017 Thomas J. Barber. All rights reserved.
//
import UIKit