【发布时间】:2015-07-16 22:07:58
【问题描述】:
在我的 Swift 应用程序中执行 self.colSoundEffects.itemPrototype = self.storyboard!.instantiateControllerWithIdentifier("SoundEffect_Item") as? NSCollectionViewItem 时,我收到以下错误消息,并且我的视图没有加载:
2015-07-16 15:01:21.790 SoundBoardFX[48244:19680526] -[NSIBObjectData initWithCoder:]: corrupt and unarchivable nib file
2015-07-16 15:01:21.791 SoundBoardFX[48244:19680526] *** Assertion failure in -[NSStoryboard instantiateControllerWithIdentifier:], /SourceCache/AppKit/AppKit-1348.17/AppKit.subproj/Storyboarding/NSStoryboard.m:208
2015-07-16 15:01:21.791 SoundBoardFX[48244:19680526] Failed to set (contentViewController) user defined inspected property on (NSWindow): Could not load the scene view controller for identifier 'SoundEffect_Item'
我已经仔细检查了所有标识符,据我所知,一切正常。当我删除该行时,我的视图加载没有问题(当然,没有项目原型)。
为什么会发生这种情况,我该如何解决?
我正在运行 OS X 10.10.4、Xcode 6.4 (6E35b)。
【问题讨论】:
-
我也遇到了同样的问题,你找到解决办法了吗?
标签: macos swift prototype nscollectionview