Created
October 28, 2016 13:36
-
-
Save matiasvillaverde/bb7735b7a415109294ae6d81fd63a07d 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
// MARK: - We use it to know when the microstrategy VC is created or to handle the error. | |
extension NavigationManager: MSTRVCRetrieverDelegate { | |
/** | |
This method is called when the VCRetriever encountered an Error while fetching the VC | |
*/ | |
func retriever(retriever: MSTRVCRetriever!, didFailWithError error: MSTRError!) { | |
//ERROR is always nil. We should be able to know if the password is not correct, or why the user can't access. | |
// Close the Waiting. | |
Async.main { | |
Navigation.loadingAlert?.close() | |
Navigation.NavigationController.visibleViewController?.showError("Error 😖".localized(), subtitle: error.localizedDescription) //This is going to crash because error is always nil. | |
} | |
} | |
/** | |
This method is called when the VCRetriever has fetched a VC | |
*/ | |
func retriever(retriever: MSTRVCRetriever!, didFetchVC viewController: UIViewController!) { | |
// Close the Waiting. | |
Async.main { | |
Navigation.loadingAlert?.close() | |
Navigation.NavigationController.pushViewController(viewController, animated: true) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment