updates.
This commit is contained in:
parent
c75337bfdf
commit
afcf8d535b
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user