This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ImageCachingService.swift | |
// Exuberant | |
// | |
// Created by TJ Barber on 12/20/17. | |
// Copyright © 2017 Thomas J. Barber. All rights reserved. | |
// | |
import UIKit |
NewerOlder