From ec0295aa35c38c5ba82263dd5e24aa5e4008b91a Mon Sep 17 00:00:00 2001 From: orkenstein Date: Mon, 31 Aug 2015 16:48:00 +0300 Subject: [PATCH] Fix for Swft cell class --- DTCollectionViewManager/DTCollectionViewFactory.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DTCollectionViewManager/DTCollectionViewFactory.m b/DTCollectionViewManager/DTCollectionViewFactory.m index 96ba1cd..694bf7e 100644 --- a/DTCollectionViewManager/DTCollectionViewFactory.m +++ b/DTCollectionViewManager/DTCollectionViewFactory.m @@ -76,10 +76,12 @@ - (void)registerCellClass:(Class)cellClass forModelClass:(Class)modelClass - (void)registerNibNamed:(NSString *)nibName forCellClass:(Class)cellClass forModelClass:(Class)modelClass { NSParameterAssert([self nibExistsWithNibName:nibName]); - + + NSString * cellClassString = [DTRuntimeHelper classStringForClass:cellClass]; + [[self.delegate collectionView] registerNib:[UINib nibWithNibName:nibName bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:[DTRuntimeHelper classStringForClass:cellClass]]; - self.cellMappings[[DTRuntimeHelper modelStringForClass:modelClass]] = NSStringFromClass(cellClass); + self.cellMappings[[DTRuntimeHelper modelStringForClass:modelClass]] = cellClassString; } - (void)registerSupplementaryClass:(Class)supplementaryClass