Skip to content

Commit

Permalink
fix ios11 scrollToItem bug
Browse files Browse the repository at this point in the history
	modified:   JXBanner.podspec
	modified:   JXBanner/Classes/Banner/Banner/JXBanner.swift
  • Loading branch information
jiaxiang.tan committed Jul 1, 2021
1 parent 09d2038 commit f294d0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion JXBanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'JXBanner'
s.version = '0.3.3'
s.version = '0.3.4'
s.summary = 'A multifunctional framework for banner unlimited rollover diagrams'

# This description is used to generate tags and improve search results.
Expand Down
7 changes: 5 additions & 2 deletions JXBanner/Classes/Banner/Banner/JXBanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,16 @@ extension JXBanner {
params.currentRollingDirection = .right
collectionView.setCollectionViewLayout(layout, animated: true)
collectionView.bounces = params.isBounces
collectionView.reloadData()
if pageCount == 1,
params.cycleWay == .forward {
params.cycleWay = .skipEnd
}
placeholderImgView.isHidden = pageCount > 0
reinitializeIndexPath()
collectionView.performBatchUpdates {[weak self] in
self?.collectionView.reloadData()
} completion: { [weak self] _ in
self?.reinitializeIndexPath()
}
}

/// Reload current indexpath
Expand Down

0 comments on commit f294d0a

Please sign in to comment.