gpt4 book ai didi

ios - 将 native Google 登录按钮的用户交互设置为 false

转载 作者:行者123 更新时间:2023-11-29 05:42:54 25 4
gpt4 key购买 nike

GIDSignInButton 类中有参数 userIntetaction 吗?我希望按钮在按下一次后变得无响应。

@IBOutlet weak var signInButton: GIDSignInButton!

我想做一些类似的事情 -

signInButton.setUserInteraction = false

最佳答案

GIDSignInButtonUIControl 的子类。因此它继承了 isEnabled 属性。尝试将其设置为false

此外,正如其他人指出的那样,您还可以使用 UIViewuserInteractionEnabled 字段。

最好使用 isEnabled(第一个选项),因为如果实现的话,它可以为 UIControl 子类显示不同的绘图。

针对 isEnabled 的 Apple 文档

Set the value of this property to true to enable the control or false to disable it. An enabled control is capable of responding to user interactions, whereas a disabled control ignores touch events and may draw itself differently.

关于ios - 将 native Google 登录按钮的用户交互设置为 false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56390070/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com