Skip to content

Instantly share code, notes, and snippets.

@Sajjon
Last active October 19, 2018 12:03
Show Gist options
  • Save Sajjon/15c51087e5ce32079792e4073b97ff06 to your computer and use it in GitHub Desktop.
Save Sajjon/15c51087e5ce32079792e4073b97ff06 to your computer and use it in GitHub Desktop.
Bridge between a controller's View and its ViewModel
import RxCocoa
protocol EmptyInitializable {
init()
}
protocol ViewModelled: EmptyInitializable {
associatedtype ViewModel: ViewModelType
var inputFromView: ViewModel.Input { get }
func populate(with viewModel: ViewModel.Output) -> [Disposable]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment