Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Created June 7, 2019 20:24
Show Gist options
  • Select an option

  • Save dmytro-anokhin/68212422111ac1f44660575b35485e3e to your computer and use it in GitHub Desktop.

Select an option

Save dmytro-anokhin/68212422111ac1f44660575b35485e3e to your computer and use it in GitHub Desktop.
class ImageLoader : BindableObject {
enum LoadingState : Hashable {
// ...
}
let didChange = PassthroughSubject<ImageLoader, Never>()
private(set) var state: LoadingState = .initial {
didSet {
didChange.send(self)
}
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment