我遵循一个教程,连接到Web获取数据并将其放入核心数据。香港专业教育学院建立了我的UICollectionView
用其标识的细胞,但是当我运行该项目,我得到这个在控制台:UICollectionViewCell无法识别?
2013-06-23 20:26:17.051 UICollectionView[912:c07] Unknown class MyCell in Interface Builder file. 2013-06-23 20:26:17.055 UICollectionView[912:c07] CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key cellLabel. with userInfo { NSTargetObjectUserInfoKey = ">"; NSUnknownUserInfoKey = cellLabel; }
而且只有一个空白(黑色)UICollectionView
。我做了子类UICollectionViewCell
,并把它称为MyCell
,我也声明并连接一个图像视图IBOutlet
以及一个UILabel
出口称为cellLabel
。
我消除了cellLabel
插座,只是离开了我的UIImageview
,但后来我得到与UIImageview
错误。
我刚刚发现了一个有趣的位,我将教程代码与我的相比,但它的相同。然后我比较了MasterViewController
网点,连接和身份,发现这种差异。他们叫AFCollectionViewCell
自定义单元格是:
但我的自定义单元格 “了myCell” 是它应该是什么:
究竟为什么他们会是一个UITabBarController
?这甚至没有意义。但是在Identity Inspector中,它们都是它们应该是的,它们都是相应自定义单元类的子类。这可能是一个错误?
看看'cellLabel'在Interface Builder中是否正确连接。 – Alexander