无法将UIButton的自定义类更改为GIDSignInButton [英] Can't change custom class of UIButton to GIDSignInButton
问题描述
我正在尝试将Google登录功能添加到自定义按钮,并且我遵循本教程.它告诉我选择按钮,并将其类设置为GIDSignInButton
,然后添加以下代码:@IBOutlet weak var signInButton: GIDSignInButton!
.
I'm trying to add Google sign in functionality to a custom button, and I'm following this tutorial. It's telling me to select the button, and set its class as GIDSignInButton
, then add this code: @IBOutlet weak var signInButton: GIDSignInButton!
.
但是,它不允许我将类设置为GIDSignInButton
.当我键入它并按Enter时,该字段将清除.
However, it doesn't let me set the class to GIDSignInButton
. When I type it in and press enter, the field just clears.
推荐答案
解决方法是在文本模式中打开storyboard
并将其直接放置的.返回interface builder
时,它将正常显示.
The workaround is open the storyboard
in text mode and put it directly. When you return to the interface builder
it will show normally.
这篇关于无法将UIButton的自定义类更改为GIDSignInButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!