参考文章
参考文章
使用xib的正确姿势
#define MAIN_BUNDLE [NSBundle bundleForClass:[self class]]  //获取bundle
[[MAIN_BUNDLE loadNibNamed:itemResuableStr owner:self options:nil] lastObject];  //加载xib
[tempCollectionView registerNib:[UINib nibWithNibName:itemResuableStr bundle:MAIN_BUNDLE] forCellWithReuseIdentifier:itemResuableStr];  //注册cell
使用图片的正确姿势
- 首先创建bundle文件夹
command+N -> Resource -> Settings Bundle
-  将相应的图片资源文件放到bundle文件中 
-  在需要使用图片的地方使用下面的代码,注意xib可以直接设置图片 
#define LQG_RESOURCE_NAME(FILE) [@"LQGPhotoKitResource.bundle" stringByAppendingPathComponent:FILE]
tempImage = [UIImage imageNamed:LQG_RESOURCE_NAME(@"blank")];