corrections made
This commit is contained in:
parent
3ab8969b1b
commit
e020a39574
@ -42,15 +42,12 @@ open class Arrow: View {
|
|||||||
|
|
||||||
open var color: UIColor {
|
open var color: UIColor {
|
||||||
get {
|
get {
|
||||||
if let model = arrowModel, model.inverted {
|
guard let model = arrowModel else { return .mvmBlack }
|
||||||
return arrowModel?.color_inverted.uiColor ?? .mvmWhite
|
return model.inverted ? model.color_inverted.uiColor : model.color.uiColor
|
||||||
} else {
|
|
||||||
return arrowModel?.color.uiColor ?? .mvmBlack
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if let model = arrowModel, model.inverted {
|
if let model = arrowModel, model.inverted {
|
||||||
arrowModel?.color_inverted = Color(uiColor: newValue)
|
model.color_inverted = Color(uiColor: newValue)
|
||||||
} else {
|
} else {
|
||||||
arrowModel?.color = Color(uiColor: newValue)
|
arrowModel?.color = Color(uiColor: newValue)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,15 +79,12 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol {
|
|||||||
|
|
||||||
public var indicatorColor: UIColor {
|
public var indicatorColor: UIColor {
|
||||||
get {
|
get {
|
||||||
if let model = carouselIndicatorModel, model.inverted {
|
guard let model = carouselIndicatorModel else { return .mvmBlack }
|
||||||
return carouselIndicatorModel?.indicatorColor_inverted.uiColor ?? .mvmWhite
|
return model.inverted ? model.indicatorColor_inverted.uiColor : model.indicatorColor.uiColor
|
||||||
} else {
|
|
||||||
return carouselIndicatorModel?.indicatorColor.uiColor ?? .mvmBlack
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if let model = carouselIndicatorModel, model.inverted {
|
if let model = carouselIndicatorModel, model.inverted {
|
||||||
carouselIndicatorModel?.indicatorColor_inverted = Color(uiColor: newValue)
|
model.indicatorColor_inverted = Color(uiColor: newValue)
|
||||||
} else {
|
} else {
|
||||||
carouselIndicatorModel?.indicatorColor = Color(uiColor: newValue)
|
carouselIndicatorModel?.indicatorColor = Color(uiColor: newValue)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,7 +106,6 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let backgroundColor_inverted = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor_inverted) {
|
if let backgroundColor_inverted = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor_inverted) {
|
||||||
|
|
||||||
self.backgroundColor_inverted = backgroundColor_inverted
|
self.backgroundColor_inverted = backgroundColor_inverted
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +120,7 @@ import UIKit
|
|||||||
try container.encode(inverted, forKey: .inverted)
|
try container.encode(inverted, forKey: .inverted)
|
||||||
try container.encodeIfPresent(frequency, forKey: .frequency)
|
try container.encodeIfPresent(frequency, forKey: .frequency)
|
||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
|
try container.encodeIfPresent(backgroundColor_inverted, forKey: .backgroundColor_inverted)
|
||||||
try container.encodeIfPresent(useVerticalLine, forKey: .useVerticalLine)
|
try container.encodeIfPresent(useVerticalLine, forKey: .useVerticalLine)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user