matching
This commit is contained in:
parent
20d23483fe
commit
d039a0a64a
@ -22,7 +22,6 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
stackView.alignment = .bottom
|
||||
stackView.distribution = .equalSpacing
|
||||
stackView.spacing = 6
|
||||
stackView.heightAnchor.constraint(lessThanOrEqualToConstant: BarsIndicatorView.indicatorBarHeight.selected).isActive = true
|
||||
return stackView
|
||||
}()
|
||||
|
||||
@ -89,7 +88,6 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
NSLayoutConstraint.activate([
|
||||
stackView.heightAnchor.constraint(equalToConstant: 4),
|
||||
heightAnchor.constraint(equalTo: stackView.heightAnchor),
|
||||
stackView.centerXAnchor.constraint(equalTo: centerXAnchor),
|
||||
stackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||
stackView.topAnchor.constraint(equalTo: topAnchor),
|
||||
bottomAnchor.constraint(equalTo: stackView.bottomAnchor),
|
||||
|
||||
@ -49,13 +49,14 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol {
|
||||
carouselIndicatorModel?.currentIndex = newIndex
|
||||
previousIndex = _currentIndex
|
||||
_currentIndex = newIndex
|
||||
performAction()
|
||||
|
||||
|
||||
if previousIndex != newIndex {
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: newIndex,
|
||||
totalCount: numberOfPages,
|
||||
isAnimated: carouselIndicatorModel?.isAnimated ?? true)
|
||||
performAction()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,7 +73,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol {
|
||||
carouselIndicatorModel?.numberOfPages = newTotal
|
||||
_numberOfPages = newTotal
|
||||
|
||||
isHidden = carouselIndicatorModel?.hidesForSinglePage ?? false && newTotal <= 1
|
||||
isHidden = (carouselIndicatorModel?.hidesForSinglePage ?? false) && newTotal <= 1
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: currentIndex,
|
||||
totalCount: newTotal,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user