Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anuragajwani/496030377dbb3e6078873c15c600567d to your computer and use it in GitHub Desktop.
Save anuragajwani/496030377dbb3e6078873c15c600567d to your computer and use it in GitHub Desktop.
func set(viewModel: MoviesViewModel) {
self.viewModel = viewModel
if self.isViewLoaded {
self.bind(viewModel: viewModel)
}
}
private func bind(viewModel: MoviesViewModel) {
self.dataSource.viewModels = viewModel.movies
self.tableView.reloadData()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment