Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize GIDSignInButton login Image in new Google+ iOS SDK?

In order to connect to google plus in my iOS app i'm using GIDSignInButton from latest Google Plus SDK for iOS.

I want to use my own image and label for login button. The problem is I don't see anywhere how to customize it. I am able to do it in previous SDK versions.

Any solutions????

like image 409
Vineeth Joseph Avatar asked Jun 04 '15 09:06

Vineeth Joseph


2 Answers

It's not possible to customize the sign in button the same way it was in the older SDKs. The older SDKs contained an image you could replace. The new SDK does not.

Having said that, you do not have to use a GIDSignInButton to sign in the user. If you want to use a custom image, just use a custom UIButton and call [[GIDSignIn sharedInstance] signIn] on touch.

like image 84
Steve Avatar answered Oct 20 '22 17:10

Steve


Thanks @Steve.

Using the same custom UIButton in Swift 4 :

GIDSignIn.sharedInstance().signIn()
like image 5
Amit Avatar answered Oct 20 '22 16:10

Amit