无法将UIButton的自定义类更改为GIDSignInButton [英] Can't change custom class of UIButton to GIDSignInButton

查看:72
本文介绍了无法将UIButton的自定义类更改为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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆