techno
techno

Reputation: 55

Google Sign In Button Not Connecting To Google Button Outlet Objective C [Pod Installation]

I have followed all procedure same as given in developer google for Google sign in but at the last when they said to connect the outlets, unfortunately, I am unable to do so, please guide me.

Upvotes: 1

Views: 866

Answers (5)

Muhammad Ali
Muhammad Ali

Reputation: 913

In the action of your UIButton call

GIDSignIn.sharedInstance().signOut()

GIDSignIn.sharedInstance().signIn()

and it will behave exactly like a GIDSignInButton!

Upvotes: 0

Simeryn Denis
Simeryn Denis

Reputation: 178

I downloaded this demo from GitHub, and I noticed that GIDSignInButton is not a UIButton but a UIView. So you may consider using UIView instead of UIButton.

Upvotes: 3

iVarun
iVarun

Reputation: 6631

You should have to set Custom class of UIButton

  • Click on UIButton
  • Click on show identity inspector
  • Set Custom Class to GIDSignInButton See image

Upvotes: 2

Ketan Parmar
Ketan Parmar

Reputation: 27448

comment that outlet and start toctrl+drag from that button to that class. from popup give outlet name what you want (exa: singninButton) and press connect. and make sure in assistant editor there is a class opened that you have set to that viewcontroller. hope this will help :)

Upvotes: 0

Sucharu Hasija
Sucharu Hasija

Reputation: 1136

please change its class first in the button settings from the UIButton to GIDSignInButton -> like here

Upvotes: 0

Related Questions