Created
July 28, 2019 19:15
-
-
Save piyushdec/1339d3a5ce67055aec57e7a550f2cc32 to your computer and use it in GitHub Desktop.
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
| import UIKit | |
| enum ImageRecordState { | |
| case new, downloaded, failed | |
| } | |
| class ImageRecord { | |
| let name: String | |
| let url: URL | |
| var state = ImageRecordState.new | |
| var image = UIImage(named: "placeholder") | |
| init(name:String, url:URL) { | |
| self.name = name | |
| self.url = url | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment