Last active
January 30, 2019 15:47
-
-
Save dimebt/226aee7e6d1370984420bac2c683b2fb 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
| fetchJSON(fromURL: "someURL") { (response, results, error) in | |
| switch response { | |
| case .success: | |
| fetchUserData(for: results) { (response, results, error) in | |
| switch response { | |
| case .success: | |
| loginUser(user: results) { (response, results, error) in | |
| switch response { | |
| case .success: | |
| // finialy all of the callbacks are finished | |
| print("Handle logic here") | |
| case .fail: | |
| print(error) | |
| } | |
| } | |
| case .fail: | |
| print(error) | |
| } | |
| } | |
| case .fail: | |
| print(error) | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment