From 36c140fb48b6cd1e44ace11d110e119ae3dbda6e Mon Sep 17 00:00:00 2001 From: Badarinath Venkatnarayansetty Date: Tue, 11 Feb 2020 09:11:13 -0800 Subject: [PATCH 1/2] Adding a capability to load specific cards added to collection view (#232) * Adding a capability to load specific cards added to collection view * Added comments foe the method * Spelling correction --- CardParts/src/Classes/CardsViewController.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CardParts/src/Classes/CardsViewController.swift b/CardParts/src/Classes/CardsViewController.swift index 1db17374..394b9ed9 100644 --- a/CardParts/src/Classes/CardsViewController.swift +++ b/CardParts/src/Classes/CardsViewController.swift @@ -126,6 +126,17 @@ open class CardsViewController : UIViewController, UICollectionViewDataSource, U collectionView.reloadData() collectionView.collectionViewLayout.invalidateLayout() } + + /// Method provides option to reload cards based on the indexPaths row and sections of collectionView. + /// - Parameters: + /// - cards: list of cards all the cards + /// - indexPaths: indexPath for the cards which needs to be reloaded. + public func loadSpecificCards(cards: [CardController] , indexPaths: [IndexPath]) { + setCardControllers(cards: cards) + registerCells(cards: cards) + collectionView.reloadItems(at: indexPaths) + collectionView.collectionViewLayout.invalidateLayout() + } private func setCardControllers(cards: [CardController]) { var cardInfos: [CardInfo] = [] From 9c11f28761348d414e752a75c289a53e59ff5c1e Mon Sep 17 00:00:00 2001 From: Chase Date: Tue, 11 Feb 2020 09:12:04 -0800 Subject: [PATCH 2/2] Update CardParts.podspec (#233) --- CardParts.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CardParts.podspec b/CardParts.podspec index f25f775c..6157dd44 100644 --- a/CardParts.podspec +++ b/CardParts.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'CardParts' - s.version = '2.26.0' + s.version = '2.27.0' s.platform = :ios s.summary = 'iOS Card UI framework.'