defaulting to clear.
This commit is contained in:
parent
960d9e0e7c
commit
5ef9754e2c
@ -33,7 +33,7 @@ import MVMCore
|
|||||||
public var updateSelectionOnly: Bool = false
|
public var updateSelectionOnly: Bool = false
|
||||||
|
|
||||||
/// The color of the background when checked.
|
/// The color of the background when checked.
|
||||||
public var checkedBackgroundColor: UIColor = .white {
|
public var checkedBackgroundColor: UIColor = .clear {
|
||||||
didSet {
|
didSet {
|
||||||
if isSelected {
|
if isSelected {
|
||||||
backgroundColor = checkedBackgroundColor
|
backgroundColor = checkedBackgroundColor
|
||||||
@ -42,7 +42,7 @@ import MVMCore
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The color of the background when unChecked.
|
/// The color of the background when unChecked.
|
||||||
public var unCheckedBackgroundColor: UIColor = .white {
|
public var unCheckedBackgroundColor: UIColor = .clear {
|
||||||
didSet {
|
didSet {
|
||||||
if !isSelected {
|
if !isSelected {
|
||||||
backgroundColor = unCheckedBackgroundColor
|
backgroundColor = unCheckedBackgroundColor
|
||||||
@ -62,7 +62,7 @@ import MVMCore
|
|||||||
private var shapeLayer: CAShapeLayer?
|
private var shapeLayer: CAShapeLayer?
|
||||||
|
|
||||||
/// Width of the check mark.
|
/// Width of the check mark.
|
||||||
public var checkWidth: CGFloat = 2.3 {
|
public var checkWidth: CGFloat = 2 {
|
||||||
didSet {
|
didSet {
|
||||||
if let shapeLayer = shapeLayer {
|
if let shapeLayer = shapeLayer {
|
||||||
CATransaction.withDisabledAnimations {
|
CATransaction.withDisabledAnimations {
|
||||||
@ -172,7 +172,7 @@ import MVMCore
|
|||||||
|
|
||||||
isUserInteractionEnabled = true
|
isUserInteractionEnabled = true
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
translatesAutoresizingMaskIntoConstraints = false
|
||||||
backgroundColor = .white
|
backgroundColor = .clear
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -304,7 +304,7 @@ import MVMCore
|
|||||||
setshapeLayerStrokeColor(checkColor)
|
setshapeLayerStrokeColor(checkColor)
|
||||||
} else {
|
} else {
|
||||||
layer.borderColor = UIColor.mfSilver().cgColor
|
layer.borderColor = UIColor.mfSilver().cgColor
|
||||||
backgroundColor = .white
|
backgroundColor = .clear
|
||||||
alpha = DisableOppacity
|
alpha = DisableOppacity
|
||||||
setshapeLayerStrokeColor(UIColor.mfSilver())
|
setshapeLayerStrokeColor(UIColor.mfSilver())
|
||||||
}
|
}
|
||||||
@ -358,7 +358,7 @@ import MVMCore
|
|||||||
shapeLayer?.removeAllAnimations()
|
shapeLayer?.removeAllAnimations()
|
||||||
shapeLayer?.removeFromSuperlayer()
|
shapeLayer?.removeFromSuperlayer()
|
||||||
shapeLayer = nil
|
shapeLayer = nil
|
||||||
backgroundColor = nil
|
backgroundColor = .clear
|
||||||
borderColor = .black
|
borderColor = .black
|
||||||
borderWidth = 1.0
|
borderWidth = 1.0
|
||||||
checkColor = .black
|
checkColor = .black
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user