enableable stuff
This commit is contained in:
parent
89499d59ed
commit
f7ba8da840
@ -42,7 +42,6 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
|
||||
open override var isEnabled: Bool {
|
||||
didSet {
|
||||
|
||||
for (i, bar) in barReferences.enumerated() {
|
||||
if i == currentIndex {
|
||||
bar.view.backgroundColor = isEnabled ? currentIndicatorColor : disabledIndicatorColor
|
||||
@ -70,8 +69,10 @@ open class BarsIndicatorView: CarouselIndicator {
|
||||
set (newColor) {
|
||||
super.indicatorColor = newColor
|
||||
|
||||
for (i, barTuple) in barReferences.enumerated() {
|
||||
barTuple.view.backgroundColor = i == currentIndex ? currentIndicatorColor : newColor
|
||||
if isEnabled {
|
||||
for (i, barTuple) in barReferences.enumerated() {
|
||||
barTuple.view.backgroundColor = i == currentIndex ? currentIndicatorColor : newColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user