addressing layout issue
This commit is contained in:
parent
0501c2daae
commit
ee107a25cf
@ -98,18 +98,6 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
])
|
||||
}
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
if barReferences.isEmpty {
|
||||
generateBars()
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: currentIndex,
|
||||
totalCount: numberOfPages,
|
||||
isAnimated: false)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//--------------------------------------------------
|
||||
@ -154,6 +142,14 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
guard let model = model as? BarsCarouselIndicatorModel else { return }
|
||||
|
||||
currentIndicatorColor = model.currentIndicatorColor.uiColor
|
||||
|
||||
if barReferences.isEmpty {
|
||||
generateBars()
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: currentIndex,
|
||||
totalCount: numberOfPages,
|
||||
isAnimated: false)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -66,17 +66,6 @@ open class NumericIndicatorView: CarouselIndicator {
|
||||
pageCount.updateView(size)
|
||||
}
|
||||
|
||||
open override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
if pageCount.text?.isEmpty == nil {
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: currentIndex,
|
||||
totalCount: numberOfPages,
|
||||
isAnimated: false)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Setup
|
||||
//--------------------------------------------------
|
||||
@ -124,6 +113,17 @@ open class NumericIndicatorView: CarouselIndicator {
|
||||
leftArrow.setNeedsDisplay()
|
||||
}
|
||||
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
|
||||
if pageCount.text?.isEmpty == nil {
|
||||
updateUI(previousIndex: previousIndex,
|
||||
newIndex: currentIndex,
|
||||
totalCount: numberOfPages,
|
||||
isAnimated: false)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - IndicatorViewProtocol
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user