Skip to content

Instantly share code, notes, and snippets.

@Yoloabdo
Last active June 4, 2020 20:05
Show Gist options
  • Select an option

  • Save Yoloabdo/a4dc89635b33df047c989148069595c8 to your computer and use it in GitHub Desktop.

Select an option

Save Yoloabdo/a4dc89635b33df047c989148069595c8 to your computer and use it in GitHub Desktop.
func userDidTapLogin(_ sender: UIButton) {
sender.startAnimating()
let command = LoginCommandsFactory.getLoginCommand(id, password: password) {[weak self] (response) in
self?.handleServerLogin(response)
sender.stopAnimating()
}
do {
try command.execute()
}catch{
sender.stopAnimating()
showError(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment