- (void)dismissModalWebViewControllerUsingCancelButton:(UIControl *)sender
{
[_modalWebViewController dismissViewControllerAnimated:YES completion:nil];
}
When I click on the cancel button I get the following error:
Error Domain=com.google.GTMOAuth2 Code=-1000 "The operation couldn’t be completed. (com.google.GTMOAuth2 error -1000.)"
I managed to make the error message disappear by modifying the method as follows:
- (void)dismissModalWebViewControllerUsingCancelButton:(UIControl *)sender
{
[_modalWebViewController cancelSigningIn];
[_modalWebViewController dismissViewControllerAnimated:YES completion:nil];
}
Now it works but the webview disappears without animation and then the navigation bar slides down and disappears. It's really ugly.
So the question is, how can I dismiss the view controller in an elegant way without getting any error messages please?