Last active
March 25, 2019 17:36
-
-
Save andrehsouza/5be2eb0bf4d621cd8ab1f59780be50c7 to your computer and use it in GitHub Desktop.
This file contains 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
// Request | |
UIAccessibility.post(notification: .layoutChanged, | |
argument: "Loading job list.") | |
spinner.isHidden = false | |
service.getJobList() { [weak self] result in | |
self?.spinner.isHidden = true | |
switch result { | |
case .success(let jobs): | |
self?.jobList = jobs | |
self?.tableView.reloadData() | |
UIAccessibility.post(notification: .layoutChanged, | |
argument: "Loading complete.") | |
case .failure(let error): | |
self?.showError(with: error.model) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment