xcode使用xib创建cell ,出现崩溃问题

xcode使用xib创建cell ,出现崩溃问题

查看崩溃日志:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid nib registered for identifier (kGameCellID) - nib must contain exactly one top level object which must be a UICollectionReusableView instance'

 

如果只是去看代码有没有写错,就是看半天也找不出原因(因为代码根本没有问题)。其实这个问题,是由于自己的粗心大意,在xib里多拖出一个单独的控件,把这个多余的控件删除就可以了。

posted on 2017-04-07 15:55  卡丁车h  阅读(340)  评论(0编辑  收藏  举报

导航