Created
February 14, 2017 08:57
-
-
Save erikolsson/5c399c107e72701686dd491c1de5b1c9 to your computer and use it in GitHub Desktop.
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
protocol ViewModelType { | |
associatedtype Model | |
associatedtype Input | |
init(model: Model, input: Input) | |
} | |
class ViewModel: ViewModelType { | |
required init(model: Model, input: Input) { | |
/// bind input | |
} | |
struct Model { | |
let userId: String | |
} | |
struct Input { | |
let buttonTap: Observable<Void> | |
} | |
} | |
let model = ViewModel.Model(userId: "123") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment