Skip to content

GTMOAuth2ViewControllerTouch displays back and forward buttons even if they won't do anything #58

@GoogleCodeExporter

Description

@GoogleCodeExporter
GTMOAuth2ViewControllerTouch displays (quite ugly) back and forward buttons 
even if they won't do anything, confusing users


diff --git 
a/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m b/Dependencies/google-api-objectivec-client/Source/OAuth2/T
index b1c9612..e99a5c8 100644
--- 
a/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m
+++ 
b/Dependencies/google-api-objectivec-client/Source/OAuth2/Touch/GTMOAuth2ViewCon
trollerTouch.m
@@ -718,6 +718,9 @@ static Class gSignInClass = Nil;
   [self saveBrowserCookies];
   [self clearSpecifiedBrowserCookies];

+       self.backButton.hidden = YES;
+       self.forwardButton.hidden = YES;
+
   if (!isViewShown_) {
     isViewShown_ = YES;
     if ([self isNavigationBarTranslucent]) {
@@ -842,6 +845,9 @@ static Class gSignInClass = Nil;

     [self updateUI];
   }
+
+       self.forwardButton.hidden = ![webView canGoForward];
+       self.backButton.hidden = ![webView canGoBack];
 }

 - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {

Original issue reported on code.google.com by [email protected] on 31 Jan 2014 at 10:31

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions