Last active
October 10, 2017 02:06
-
-
Save koromiko/c4b463e33b58438214af090b72d1a22d 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
viewModel.updateLoadingStatus = { [weak self] () in | |
DispatchQueue.main.async { | |
let isLoading = self?.viewModel.isLoading ?? false | |
if isLoading { | |
self?.activityIndicator.startAnimating() | |
self?.tableView.alpha = 0.0 | |
}else { | |
self?.activityIndicator.stopAnimating() | |
self?.tableView.alpha = 1.0 | |
} | |
} | |
} | |
viewModel.reloadTableViewClosure = { [weak self] () in | |
DispatchQueue.main.async { | |
self?.tableView.reloadData() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment