Created
October 25, 2017 11:23
-
-
Save azamsharp/e69ed91504438ee93ef55b39e0b08fce 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