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
| // | |
| // ImageCache.swift | |
| // | |
| // Created by Alec O'Connor on 3/6/18. | |
| // Copyright © 2018 Alec O'Connor. All rights reserved. | |
| // | |
| import UIKit | |
| class ImageCache { |
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
| struct Hoge: Storagable { | |
| let id: Int | |
| let name: String | |
| } | |
| protocol Storagable: Codable {} | |
| extension Storagable { | |
| func save(key: String = "\(Self.self)", userDefaults: UserDefaults = .standard) throws { | |
| let data = try JSONEncoder().encode(self) |
OlderNewer