I was searching for solution but to my suprise nobody asked this question yet:
How to change title of Google Sign In button?
I was trying to:
setTitle:
but didn't help.find "Sign in" string in Google Plus framework directory but well... my Finder didn't find such string. 3.Use following code which works for changing Facebook Login button:
for (id obj in self.signInButtonGPP.subviews)
{
if ([obj isKindOfClass:[UILabel class]])
{ UILabel * label = view;
label.text = @"Google";
}}
Thank you
The resources for the button are contained in the GooglePlus.bundle file. The value for the label is coming from the GooglePlusPlatform.strings file in the bundle.
You can directly edit the value of the Sign in key to have a custom title. (This would be a dirty fix though, you must do it for all the locales.)
And while doing that be sure to comply with the Google+ Sign-In button branding guidelines.
Well.. I think you can use same solution I used when it came to change Facebook login button text. Maybe its not the best & clean way, but.. it works. All you need to do is to set your original G+ login button frame to CGRectZero, and than add your own button with the same look as G+ button has, and custom text. Than, when you detect touch on your button you need to pass it to G+ button like this:
[self.gppSigninButton sendActionsForControlEvents:UIControlEventTouchUpInside];
Didn't test it, but i think it'll work fine. Hope it'll help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With