Call back when user presses GIDSignInButton

流过昼夜 提交于 2019-12-11 17:42:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!