gpt4 book ai didi

ios - [UIView setTextFont :]: unrecognized selector sent to instance in swift

转载 作者:行者123 更新时间:2023-11-30 12:44:28 25 4
gpt4 key购买 nike

我想在我正在用 swift 开发的应用程序中实现标签。所以我决定使用this library因为它在 swift 3 上是最新的。
在我正在使用这个 tagView 的类的 super.viewDidLoad 中,我已根据文档添加了该第三方库的 github 页面上给出:

myTagListView.textFont = UIFont.systemFont(ofSize: 24)
myTagListView.alignment = .center

当这个 View Controller 被插入堆栈时,应用程序崩溃并显示以下消息:

-[UIView setTextFont:]: unrecognized selector sent to instance

问题出在哪里?

最佳答案

确保您是否在 Storyboard上将自定义类名称添加为 TagListView 一次

例如

enter image description here

关于ios - [UIView setTextFont :]: unrecognized selector sent to instance in swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41805599/

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