looking bette
This commit is contained in:
parent
92651cd960
commit
b05b6c20c0
@ -77,7 +77,7 @@ open class LoadingSpinner: View {
|
||||
Pose(delay: 0.7, start: 0.500, length: 0.5),
|
||||
Pose(delay: 0.6, start: 1.000, length: 0.3),
|
||||
Pose(delay: 0.5, start: 1.500, length: 0.2),
|
||||
Pose(delay: 0.4, start: 1.875, length: 0.2),
|
||||
Pose(delay: 0.5, start: 1.875, length: 0.2),
|
||||
Pose(delay: 0.3, start: 2.250, length: 0.3),
|
||||
Pose(delay: 0.2, start: 2.600, length: 0.5),
|
||||
Pose(delay: 0.2, start: 3.000, length: 0.7)
|
||||
@ -93,7 +93,7 @@ open class LoadingSpinner: View {
|
||||
var strokeEnds = [CGFloat]()
|
||||
|
||||
let poses = Self.poses
|
||||
let totalSeconds = poses.reduce(0) { $0 + $1.delay }
|
||||
var totalSeconds: CFTimeInterval = poses.reduce(0) { $0 + $1.delay }
|
||||
|
||||
for pose in poses {
|
||||
time += pose.delay
|
||||
@ -103,6 +103,8 @@ open class LoadingSpinner: View {
|
||||
strokeEnds.append(pose.length)
|
||||
}
|
||||
|
||||
totalSeconds += 0.3
|
||||
|
||||
animateKeyPath(keyPath: "strokeEnd", duration: totalSeconds, times: times, values: strokeEnds)
|
||||
animateKeyPath(keyPath: "transform.rotation", duration: totalSeconds, times: times, values: rotations)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user