问题
I am adding Google sign-in to my app. I have added GIDSignInButton in storyboard. When user clicks on that button user is sent to webpage where he can login. I wanted to do some checks before it happens. Is there any way that I can get a call back method before user is directed to webpage?
回答1:
You can create any button with same look and hook it to this action
@IBOutlet func btnClicked(_ sender:UIbutton) {
// do what you want use return if checks are failed
GIDSignIn.sharedInstance().signIn()
}
来源:https://stackoverflow.com/questions/51213732/call-back-when-user-presses-gidsigninbutton