You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode14.0.1中ChatBot项目ThinkingCell解包Optional值崩溃

Fatal error: Unexpectedly found nil while unwrapping UIImage in ThinkingCell (Xcode 14.0.1, migrated from Xcode 11.6)

我正在完成OOP课程的项目,是《Swift应用开发入门》第17章的ChatBot,这个项目原本适配Xcode 11.6,现在用Xcode 14.0.1运行时,在非作业内容的ThinkingCell模块出现错误。

错误发生在这一行代码:

return UIImage(named: "thinking\(index)")!

报错信息为:

Fatal error: Unexpectedly found nil while unwrapping an Optional value

我查看截图确认索引值为1,猜测问题和索引有关。这是我第一次在Stack Overflow发帖,如果有信息没说清楚或者格式不对,请告诉我,谢谢!

内容的提问来源于stack exchange,提问作者Toaster

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 19:55:22