From ff97c1a48b72afd8cb1fbbab4f2b570d1714b36f Mon Sep 17 00:00:00 2001 From: Denys Telezhkin Date: Fri, 7 Aug 2015 14:41:30 +0300 Subject: [PATCH] use mainBundle everywhere instead of bundleForClass --- DTCollectionViewManager.podspec | 2 +- DTCollectionViewManager/DTCollectionViewFactory.m | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DTCollectionViewManager.podspec b/DTCollectionViewManager.podspec index 83a590f..f23fe63 100644 --- a/DTCollectionViewManager.podspec +++ b/DTCollectionViewManager.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DTCollectionViewManager' - s.version = '3.1.3' + s.version = '3.1.4' s.license = 'MIT' s.summary = 'The most simple and robust way to manage UICollectionView.' s.homepage = 'https://github.com/DenHeadless/DTCollectionViewManager' diff --git a/DTCollectionViewManager/DTCollectionViewFactory.m b/DTCollectionViewManager/DTCollectionViewFactory.m index 07b397d..96ba1cd 100644 --- a/DTCollectionViewManager/DTCollectionViewFactory.m +++ b/DTCollectionViewManager/DTCollectionViewFactory.m @@ -67,7 +67,7 @@ - (void)registerCellClass:(Class)cellClass forModelClass:(Class)modelClass if ([self nibExistsWithNibName:cellClassString]) { [[self.delegate collectionView] registerNib:[UINib nibWithNibName:cellClassString - bundle:[NSBundle bundleForClass:[self class]]] + bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:[DTRuntimeHelper classStringForClass:cellClass]]; } self.cellMappings[[DTRuntimeHelper modelStringForClass:modelClass]] = [DTRuntimeHelper classStringForClass:cellClass]; @@ -77,7 +77,7 @@ - (void)registerNibNamed:(NSString *)nibName forCellClass:(Class)cellClass forMo { NSParameterAssert([self nibExistsWithNibName:nibName]); - [[self.delegate collectionView] registerNib:[UINib nibWithNibName:nibName bundle:[NSBundle bundleForClass:[self class]]] + [[self.delegate collectionView] registerNib:[UINib nibWithNibName:nibName bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:[DTRuntimeHelper classStringForClass:cellClass]]; self.cellMappings[[DTRuntimeHelper modelStringForClass:modelClass]] = NSStringFromClass(cellClass); } @@ -91,7 +91,7 @@ - (void)registerSupplementaryClass:(Class)supplementaryClass if ([self nibExistsWithNibName:supplementaryClassString]) { [[self.delegate collectionView] registerNib:[UINib nibWithNibName:supplementaryClassString - bundle:[NSBundle bundleForClass:[self class]]] + bundle:[NSBundle mainBundle]] forSupplementaryViewOfKind:kind withReuseIdentifier:supplementaryClassString]; } @@ -108,7 +108,7 @@ - (void)registerNibNamed:(NSString *)nibName NSParameterAssert([self nibExistsWithNibName:nibName]); [[self.delegate collectionView] registerNib:[UINib nibWithNibName:nibName - bundle:[NSBundle bundleForClass:[self class]]] + bundle:[NSBundle mainBundle]] forSupplementaryViewOfKind:kind withReuseIdentifier:[DTRuntimeHelper classStringForClass:supplementaryClass]];