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
相关产品推荐
相关产品推荐

