码迷,mamicode.com
首页 > 其他好文 > 详细

reason: 'Could not load NIB in bundle: "XXXXXXX" with name 'xxCell'

时间:2015-02-14 16:18:40      阅读:834      评论:0      收藏:0      [点我收藏+]

标签:ios

错误信息:reason: ‘Could not load NIB in bundle: ‘NSBundle </Users/caitong/Library/Developer/CoreSimulator/Devices/5EC57F6E-CC41-4FD6-80D7-443B52B9D181/data/Containers/Bundle/Application/BB8E1CAE-441F-46FF-802A-EFC05088D841/ColleceService.app> (loaded)‘ with name ‘collectViewCell‘‘


查找原因:UICollectionView注册的是时候出错;

如下:

[self.collectionView registerNib:[UINib nibWithNibName:@"schoolViewCell" bundle:nil] forCellWithReuseIdentifier:identifer];

正确应该是cell类的名字,类名字写错了.


谨记:有些类名字很长,不要用手打出来,尽量复制.不要那么自信能拼对.少写或者多写都会导致出错,这是血的教训.


reason: 'Could not load NIB in bundle: "XXXXXXX" with name 'xxCell'

标签:ios

原文地址:http://blog.csdn.net/duoduo_333/article/details/43817455

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!