gpt4 book ai didi

swift - 从 Firebase 实时数据库获取数据返回 nil Swift

转载 作者:行者123 更新时间:2023-11-28 13:24:10 25 4
gpt4 key购买 nike

我不明白,我尝试使用 NSObjects,我能够在屏幕上打印来 self 的 Real Time Firebase DatabaseString 值> 但当我尝试将它分配给 UILabel 时,它崩溃并出现 nil 值异常:

enter image description here

这是为什么?

最佳答案

检查您的 UILabel weatherLabel 不是 nil。似乎值不是 nil,所以您最好检查 UIStoryboardUIViewController 之间的连接以链接您的 UILabel正确。

关于swift - 从 Firebase 实时数据库获取数据返回 nil Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58670557/

25 4 0
文章推荐: javascript - 如何使用scrapy爬取在下一个按钮中隐藏url为href ="javascript:;"的网站
文章推荐: html - 格式化
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com