Skip to content

Commit b319d38

Browse files
committed
fix stripesPath logic in func updateShapePaths
1 parent 169973d commit b319d38

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

Sources/ComponentsKit/Components/CircularProgress/UKCircularProgress.swift

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,14 @@ open class UKCircularProgress: UIView, UKComponent {
118118
self.progressLayer.path = circlePath.cgPath
119119
self.stripesMaskLayer.path = circlePath.cgPath
120120

121-
if case .striped = self.model.style {
122-
let stripesPath = self.model.stripesBezierPath(in: self.bounds)
123-
124-
var transform = CGAffineTransform.identity
125-
transform = transform
126-
.translatedBy(x: center.x, y: center.y)
127-
.rotated(by: -CGFloat.pi / 2)
128-
.translatedBy(x: -center.x, y: -center.y)
129-
130-
stripesPath.apply(transform)
131-
132-
self.stripesLayer.path = stripesPath.cgPath
133-
} else {
134-
CATransaction.begin()
135-
CATransaction.setDisableActions(true)
136-
self.stripesLayer.path = nil
137-
self.stripesLayer.removeAllAnimations()
138-
self.stripesMaskLayer.removeAllAnimations()
139-
CATransaction.commit()
140-
}
121+
let stripesPath = self.model.stripesBezierPath(in: self.bounds)
122+
var transform = CGAffineTransform.identity
123+
transform = transform
124+
.translatedBy(x: center.x, y: center.y)
125+
.rotated(by: -CGFloat.pi / 2)
126+
.translatedBy(x: -center.x, y: -center.y)
127+
stripesPath.apply(transform)
128+
self.stripesLayer.path = stripesPath.cgPath
141129
}
142130

143131
private func updateProgress() {

0 commit comments

Comments
 (0)