Created
October 25, 2017 11:23
-
-
Save azamsharp/367238a99ee473d2cdc6d24a58d56849 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
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.webservice = Webservice() | |
self.viewModel = ArticleListViewModel(service: self.webservice) | |
self.title = self.viewModel.title | |
loadArticles2() | |
} | |
// Calling the webservice from the view model | |
private func loadArticles2() { | |
self.viewModel.get { articleListViewModel in | |
self.viewModel = articleListViewModel | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment