From afcf8d535ba987f9ddfd87ab32acbb7e159749e1 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Thu, 26 Sep 2019 13:56:02 -0400 Subject: [PATCH] updates. --- MVMCoreUI/Atoms/Views/Checkbox.swift | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/MVMCoreUI/Atoms/Views/Checkbox.swift b/MVMCoreUI/Atoms/Views/Checkbox.swift index 4408ea6d..1ab976ef 100644 --- a/MVMCoreUI/Atoms/Views/Checkbox.swift +++ b/MVMCoreUI/Atoms/Views/Checkbox.swift @@ -29,13 +29,13 @@ import MVMCore private var shapeLayer: CAShapeLayer? public var cornerRadiusValue: CGFloat { - return bounds.height / 2.0 + return bounds.height / 2 } public var lineWidth: CGFloat = 1 public var lineColor: UIColor = .black public var borderColor: UIColor = .black - private var checkedBackgroundColor: UIColor = .white + public var checkedBackgroundColor: UIColor = .white override open var isSelected: Bool { didSet { @@ -129,7 +129,7 @@ import MVMCore } //-------------------------------------------------- - // MARK: - Methods + // MARK: - Action //-------------------------------------------------- open override func sendAction(_ action: Selector, to target: Any?, for event: UIEvent?) { @@ -140,6 +140,10 @@ import MVMCore print("Actions Inititaled") } + //-------------------------------------------------- + // MARK: - Methods + //-------------------------------------------------- + private func drawCheck() { if shapeLayer == nil { @@ -169,6 +173,7 @@ import MVMCore /* //Offsets based on the 124x124 example checkmark + let startXOffset: Float = 42.0 / 124.0 let startYOffset: Float = 66.0 / 124.0 let pivotXOffset: Float = 58.0 / 124.0 @@ -202,7 +207,7 @@ import MVMCore animateStrokeEnd.fillMode = .both animateStrokeEnd.isRemovedOnCompletion = false animateStrokeEnd.duration = 0.33 - animateStrokeEnd.fromValue = layer?.strokeEnd ?? 0.0 + animateStrokeEnd.fromValue = layer?.strokeEnd ?? 0 animateStrokeEnd.toValue = selected ? 1 : 0 animateStrokeEnd.timingFunction = CAMediaTimingFunction(name: .linear) layer?.add(animateStrokeEnd, forKey: "strokeEndAnimation")