Fix for showing pagingView when itemWidthPercent is less than 100
This commit is contained in:
parent
1b5ca94988
commit
ad7bf0dad6
@ -111,7 +111,7 @@ open class Carousel: View {
|
|||||||
/// Updates if the pager is visible or not.
|
/// Updates if the pager is visible or not.
|
||||||
private func updatePagerVisibility() {
|
private func updatePagerVisibility() {
|
||||||
guard let pagingView = pagingView else { return }
|
guard let pagingView = pagingView else { return }
|
||||||
let shouldHidePager = collectionView.contentSize.width < bounds.width
|
let shouldHidePager = ((molecules?.count ?? 0) < 2) && (collectionView.contentSize.width < bounds.width)
|
||||||
if (shouldHidePager && !pagingView.isHidden) || (!shouldHidePager && pagingView.isHidden) {
|
if (shouldHidePager && !pagingView.isHidden) || (!shouldHidePager && pagingView.isHidden) {
|
||||||
pagingView.isHidden = shouldHidePager
|
pagingView.isHidden = shouldHidePager
|
||||||
pagingBottomPin?.isActive = !shouldHidePager
|
pagingBottomPin?.isActive = !shouldHidePager
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user