dash color
This commit is contained in:
parent
0808d63e24
commit
a16a362c03
@ -19,6 +19,9 @@ open class DashLine: View {
|
||||
get { return model as? DashLineModel }
|
||||
}
|
||||
|
||||
//TODO: Need this for BAU. Can remove once we fix BAU
|
||||
public var dashColor: UIColor?
|
||||
|
||||
@objc private var dashLayer: CAShapeLayer?
|
||||
|
||||
//------------------------------------------------------
|
||||
@ -68,7 +71,7 @@ open class DashLine: View {
|
||||
dashLayer.lineCap = .round
|
||||
dashLayer.lineDashPattern = [NSNumber(value: 2), NSNumber(value: 2)]
|
||||
dashLayer.path = path.cgPath
|
||||
dashLayer.strokeColor = dashModel?.dashColor.cgColor
|
||||
dashLayer.strokeColor = dashModel?.dashColor.cgColor ?? dashColor?.cgColor
|
||||
dashLayer.fillColor = UIColor.clear.cgColor
|
||||
dashLayer.backgroundColor = backgroundColor?.cgColor ?? UIColor.white.cgColor
|
||||
self.dashLayer = dashLayer
|
||||
|
||||
Loading…
Reference in New Issue
Block a user