【发布时间】:2016-05-13 16:52:38
【问题描述】:
我正在尝试加载笔尖,但不断收到以下错误:
-[NSViewController initWithCoder:] could not instantiate an NSViewController for a nib in the "" bundle because the bundle has not been loaded.
缺少捆绑包名称...是什么原因造成的?
func collectionView(collectionView: NSCollectionView, itemForRepresentedObjectAtIndexPath indexPath: NSIndexPath) -> NSCollectionViewItem
{
let item = collectionView.makeItemWithIdentifier("MyNib", forIndexPath: indexPath) // Crashes here
}
谢谢
【问题讨论】:
-
显示你用来实例化 NSViewController 的代码...
-
添加了代码,这是很标准的东西。