Skip to content

Commit

Permalink
use mainBundle everywhere instead of bundleForClass
Browse files Browse the repository at this point in the history
  • Loading branch information
DenTelezhkin committed Aug 7, 2015
1 parent f2ece47 commit ff97c1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DTCollectionViewManager.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
8 changes: 4 additions & 4 deletions DTCollectionViewManager/DTCollectionViewFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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);
}
Expand All @@ -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];
}
Expand All @@ -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]];

Expand Down

0 comments on commit ff97c1a

Please sign in to comment.