Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove GPPSignInButton's default style (text, G+ image) to add your own in iOS

We're using the GGPSignInButton to log into GooplePlus service. we want to have a custom look and feel for the button, but I couldn't find a way to turn off the text and image that show up with the button automatically when I tell a UIButton he is of a kind GPPSignInButton. Here's how it looks when I add my own design inside an otherwise empty button which is GPPSignInButton:

enter image description here

The only way I've been able to make it disappear is pretty patchy: (First wire up the button to a IBOutlet called gPlusButton) [self.gPlusButton.subviews[0] removeFromSuperview];

I also tried using my own button, and when pressed calling manually to [[GPPSignIn sharedInstance] authenticate] method seems to result in an incorrect login (for example, the login token isn't saved into the key chain Google+ later uses to silently authenticate me).

Does anyone know of a better way to design my own style for the button? BTW it appears this is supported for web sign in buttons.

like image 804
shaioz Avatar asked Mar 24 '14 09:03

shaioz


Video Answer


1 Answers

Just don't use the GPPSignInButton! Your idea of calling authenticate directly is correct - just make sure you are configuring the shared instance (including the delegate and so on) before calling authenticate.

like image 173
Ian Barber Avatar answered Sep 27 '22 20:09

Ian Barber