Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/intuit/CardParts
Browse files Browse the repository at this point in the history
  • Loading branch information
croossin committed Feb 11, 2020
2 parents dd9fdf9 + 9c11f28 commit 5783fcd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CardParts.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.'

Expand Down
11 changes: 11 additions & 0 deletions CardParts/src/Classes/CardsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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] = []
Expand Down

0 comments on commit 5783fcd

Please sign in to comment.