Created
January 10, 2012 11:55
-
-
Save stuffmc/1588654 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
GTMOAuth2ViewControllerTouch *viewController = [GTMOAuth2ViewControllerTouch controllerWithScope:scope | |
clientID:CLIENT_ID | |
clientSecret:CLIENT_SECRET | |
keychainItemName:kKeychainItemName | |
completionHandler:completionHandler]; | |
UIViewController *parentViewController = viewController; | |
if (![self.delegate isKindOfClass:[UINavigationController class]]) { | |
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:viewController] autorelease]; | |
self.navigationController.navigationBar.translucent = YES; | |
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self.delegate action:@selector(dismissViewControllerAnimated:completion:)]; | |
self.navigationController.navigationItem.leftBarButtonItem = leftBarButtonItem; | |
// [leftBarButtonItem release]; | |
parentViewController = self.navigationController; | |
} | |
parentViewController.modalTransitionStyle = self.delegate.modalTransitionStyle; | |
[self.delegate presentViewController:parentViewController animated:YES completion:^{ | |
NSLog(@"Google Sign In presented"); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment