UICollectionView - 将故事板项目移植到没有IB项目
问题描述:
我找到了一个开源项目(link here),我需要在我的下一个项目中实现它。 问题是,该框架设置为一个故事板项目,我不会使用它。 我在将此项目转换为非故事板,非.xib项目时遇到问题。 我在another SA question和gitpage of this framework的评论中已经询问过一些帮助,但时间在缩短。UICollectionView - 将故事板项目移植到没有IB项目
即使类/笔尖已注册,我仍然收到此错误:*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier RPSlidingCellIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
。
向正确的方向推进将不胜感激。为了您的方便,我将我的测试项目添加到我的dropbox。
Cell类获取RPSlidingMenuViewController.m viewDidLoad中注册
答
多亏了艾登,谁指出,我的项目是实际工作,我想通了,清理出模拟和/ DerivedData是解决办法。
如果环境告诉你注册类或笔尖,然后尝试在'UICollectionViewController'中寻找'registerClass'或'registerNib'方法 – 2014-09-01 10:56:17
@Jasper Pol代码在我身边正常工作检查截图链接: --http://postimg.org/image/7lkecl2vx/ – Shekhu 2014-09-01 11:13:45
@Aiden你刚下载我的Dropbox项目并编译它? – Jasper 2014-09-01 11:47:42