xcode - IBUIColor.m 中的断言失败 - Xamarin.iOS
问题描述
突然之间,我的 Xamarin iOS 项目没有构建。我上次提交的 Storyboard 版本正在运行,但文件中的任何细微更改都会产生以下错误。
MainController.storyboard : error : 2019-11-19 19:53:33.159 ibtoold[9510:345883] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-15505/InterfaceBuilderKit/ImageCatalog/Library/IBUIColor.m:105
MainController.storyboard : error : Details: nsColor should be an instance inheriting from NSColor, but it is IBUIColor
MainController.storyboard : error : Object: <IBUIColor: 0x7fd6420a5290>
MainController.storyboard : error : Method: -initWithNSColor:
这是完整的日志:https ://del.dog/obapeletof
这是完整的 xcode 崩溃日志:https ://del.dog/oyibarutoc
如果我尝试在 xcode 中打开文件,它会产生相同的错误并导致 xcode 崩溃。我现在真的不知道是什么导致了错误。我尝试在 xml 格式的 Storyboard 中搜索 nscolor,但没有!
解决方案
Xamarin iOS 设计师出于某种原因从 StoryBoard 资源中删除了我下面的自定义颜色资产
<namedColor name="lightdarkcolor">
<color colorSpace="custom" customColorSpace="sRGB" red="0" green="0" blue="0" alpha="1" />
</namedColor>
我不得不手动将它添加到后面的情节提要代码中。似乎 xamarin ios 设计师正在为每个项目使用颜色资产(可能在最近更新之后)。
推荐阅读
- javascript - Service Worker 返回 javascript 文件的脱机 html 页面
- visual-studio - Visual Studio 单元测试文件非常大。如何最好地分解它?
- sql - SQL - 成对的时间序列事件
- jmeter - 有人可以分享 Locust 测试结果与 jmeter 测试不同的原因吗?
- java - 为什么一些java程序中的类实现了一个空接口?
- c# - 有没有办法检测特定进程何时闪烁其窗口/任务栏图标?
- c - 尽管编译器显示 0 个警告,但计算器代码根本不起作用
- flutter - 如何在颤动中使用 audio_session 在扬声器和耳机之间进行切换
- encryption - 将低级 OpenSSL API 迁移到高级 OpenSSL API 所需的建议
- stack - 关于 L = {a^nb^(2n) | PDA 的说明 n>=1}