gpt4 book ai didi

ios - MDC 崩溃并显示 'NSInvalidArgumentException' ,原因 : '-[UIButton applyOutlinedThemeWithScheme:]: unrecognized selector sent to instance

转载 作者:行者123 更新时间:2023-11-29 05:41:17 26 4
gpt4 key购买 nike

我正在尝试设置这样的按钮属性,当我添加此代码时,它崩溃了,甚至没有显示我在 main.storyboard 中的按钮。

 let containerScheme = MDCContainerScheme()
cancelButton.applyOutlinedTheme(withScheme: containerScheme)

console

最佳答案

我遇到了同样的问题。但我是通过代码构建 UI 的。

import MaterialComponents.MaterialButtons
import MaterialComponents.MaterialButtons_Theming

let button = MDCButton()
button.applyTextTheme(withScheme: MDCContainerScheme())

以下内容对我有帮助。我刚刚调用了选项产品 -> 清理构建文件夹。之后程序异常终止的现象消失了。

关于ios - MDC 崩溃并显示 'NSInvalidArgumentException' ,原因 : '-[UIButton applyOutlinedThemeWithScheme:]: unrecognized selector sent to instance,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56519071/

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