如何在新的Google+ iOS SDK中自定义GIDSignInButton登录图片?

Vin*_*eph 19 objective-c ios google-plus swift ios8

为了在我的iOS应用程序中连接到google plus,我正在使用最新的Google Plus SDK for iOS中的 GIDSignInButton .

我想使用我自己的图像和标签登录按钮.问题是我没有看到任何地方如何定制它.我能够在之前的SDK版本中执行此操作.

任何解决方案????

Ste*_*eve 81

无法像在较旧的SDK中那样自定义登录按钮.较旧的SDK包含您可以替换的图像.新的SDK没有.

话虽如此,您不必使用a GIDSignInButton来登录用户.如果您想使用自定义图像,只需使用自定义UIButton和通话[[GIDSignIn sharedInstance] signIn].

  • 完美的解决方案。谢谢 (2认同)

Ami*_*mit 5

Thanks @Steve.

Using the same custom UIButton in Swift 4 :

GIDSignIn.sharedInstance().signIn()
Run Code Online (Sandbox Code Playgroud)