Created
May 6, 2017 20:37
-
-
Save anuragajwani/496030377dbb3e6078873c15c600567d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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