Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Commit 2f245ee

Browse files
authored
Fix issue relating to timer label being removed (#172)
version 6.0.1
1 parent 332ea72 commit 2f245ee

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Version 6.0.1
2+
3+
- Fix bug relating to label for rings being removed during animation ([#171](https://github.com/luispadron/UICircularProgressRing/issues/171))
4+
15
# Version 6.0.0
26

37
- Fixed issue with API of `UICircularRingStyle` which made it impossible to have both a gradient and outer ring style, etc.

UICircularProgressRing.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Pod::Spec.new do |s|
33

44
s.name = "UICircularProgressRing"
5-
s.version = "6.0.0"
5+
s.version = "6.0.1"
66
s.summary = "A highly customizable circular progress bar for iOS written in Swift"
77

88
s.description = <<-DESC

src/UICircularProgressRing/UICircularRingLayer.swift

+22-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import UIKit
3030
This is the class that handles all the drawing and animation.
3131
This class is not interacted with, instead
3232
properties are set in UICircularRing and those are delegated to here.
33-
33+
3434
*/
3535
class UICircularRingLayer: CAShapeLayer {
3636

@@ -76,6 +76,27 @@ class UICircularRingLayer: CAShapeLayer {
7676
return animatableProperties.index(of: key) != nil
7777
}
7878

79+
// MARK: Init
80+
81+
override init() {
82+
super.init()
83+
}
84+
85+
override init(layer: Any) {
86+
// copy our properties to this layer which will be used for animation
87+
guard let layer = layer as? UICircularRingLayer else { fatalError("unable to copy layer") }
88+
valueFormatter = layer.valueFormatter
89+
valueKnobStyle = layer.valueKnobStyle
90+
animationDuration = layer.animationDuration
91+
animationTimingFunction = layer.animationTimingFunction
92+
animated = layer.animated
93+
shouldAnimateProperties = layer.shouldAnimateProperties
94+
propertyAnimationDuration = layer.propertyAnimationDuration
95+
super.init(layer: layer)
96+
}
97+
98+
required init?(coder aDecoder: NSCoder) { return nil }
99+
79100
// MARK: Draw
80101

81102
/**

0 commit comments

Comments
 (0)