Skip to content

Instantly share code, notes, and snippets.

@piyushdec
Created July 28, 2019 19:15
Show Gist options
  • Select an option

  • Save piyushdec/1339d3a5ce67055aec57e7a550f2cc32 to your computer and use it in GitHub Desktop.

Select an option

Save piyushdec/1339d3a5ce67055aec57e7a550f2cc32 to your computer and use it in GitHub Desktop.
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