This file contains 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
class StructStateViewModel { | |
public let state: Observable<State> | |
struct State { | |
var id: String? | |
var loading = false | |
var image: UIImage? | |
var empty: String? | |
var error: String? |
This file contains 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
class EnumeratedStateViewModel { | |
public let state: Observable<State> | |
enum State: Equatable { | |
case initial | |
case loading | |
case loaded(UIImage) | |
case empty(String) | |
case error(String) |
NewerOlder