ios - 使用 Storyboard时 GIDSignInButton 未加载 Google Plus.bundle

标签 ios ios7 google-plus uistoryboard

使用适用于 iOS SDK v1.4.1 的 Google+ 登录,我在 Storyboard的 View 中放置了一个类 GPPSignInButton 的按钮。它连接到 GPPSignInButton socket 。 GooglePlus.bundle 已添加到项目中并复制到应用程序包中,并且可以在运行时从应用程序中(以编程方式)加载。

当我在设备上或模拟器中运行该应用程序时,按钮是蓝色的。

enter image description here

我希望它显示一个红色的 Sign-in with Google+ 按钮。 以编程方式创建按钮会导致按钮正确显示。检查通过 Storyboard实例化的按钮的 subview 和以编程方式创建的按钮的 subview 显示 Storyboard按钮缺少 UIImageView 实例。

-ObjC 链接器标志已设置。我什至尝试添加 -all_load 但没有效果。

我怀疑 GPPSignInButtoninitWithCoder: 中存在错误。任何人都可以确认或复制这个吗?

最佳答案

解决方案是将按钮类型设置为 Custom——Google 文档中缺少这一步。

关于ios - 使用 Storyboard时 GIDSignInButton 未加载 Google Plus.bundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20220147/

相关文章:

java - 获得 token 后如何从 Google Plus API 获取电子邮件地址

ios - 没有 self 的保留周期?

iphone - 在屏幕上随机移动一个对象

ios Sprite 套件 bodyWithBodies 不工作

ios - iOS 7 状态栏中的 MFMailComposeViewController 是黑色的

objective-c - 水平镜像 SKSpriteNode 纹理

android - Google Plus 登录 'Choose an Account' 对话框出现两次

ipad - UITableview 在 UIPopover 中无法正确旋转

ios - iOS 7上的动画问题,但iOS 8上没有

email - 将 Google Plus(一个或共享)链接添加到电子邮件简报