Skip to content

Instantly share code, notes, and snippets.

@bobgodwinx
Created May 30, 2018 10:11
Show Gist options
  • Select an option

  • Save bobgodwinx/c84331b9f8b7169183aa8e48e3b5e8a4 to your computer and use it in GitHub Desktop.

Select an option

Save bobgodwinx/c84331b9f8b7169183aa8e48e3b5e8a4 to your computer and use it in GitHub Desktop.
S4D08
/// Now composing our `MVVM`
/// just like a plug and play
/// `Model`
let provider = ContactProvider()
/// `ViewModel`
let viewModel = ContactViewModel(provider)
/// `View`
let viewController = ContactViewController(viewModel)
// Present the view controller in the Live View window
PlaygroundPage.current.liveView = viewController
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment