Skip to content

Instantly share code, notes, and snippets.

@FitzAfful
Created April 18, 2020 00:39
Show Gist options
  • Save FitzAfful/e9cb3ada08b4dc123a3db43e3936b15f to your computer and use it in GitHub Desktop.
Save FitzAfful/e9cb3ada08b4dc123a3db43e3936b15f to your computer and use it in GitHub Desktop.
func setupEventBusSubscriber() {
_ = EventBus.onMainThread(self, name: "fetchEmployees") { result in
if let event = result!.object as? EmployeesEvent {
if event.employees != nil {
self.showTableView()
} else if let message = event.errorMessage {
self.showAlert(title: "Error", message: message)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment