Skip to content

Commit e0b125b

Browse files
authored
Merge pull request #287 from chohey/master
Fix repeat count in the flip animation
2 parents 01cb67a + df1ecb6 commit e0b125b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Spring/Spring.swift

+2
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ public class Spring : NSObject {
264264
animation.toValue = NSValue(caTransform3D:
265265
CATransform3DConcat(perspective, CATransform3DMakeRotation(CGFloat(CGFloat.pi), 0, 1, 0)))
266266
animation.duration = CFTimeInterval(duration)
267+
animation.repeatCount = repeatCount
267268
animation.beginTime = CACurrentMediaTime() + CFTimeInterval(delay)
268269
animation.timingFunction = getTimingFunction(curve: curve)
269270
layer.add(animation, forKey: "3d")
@@ -278,6 +279,7 @@ public class Spring : NSObject {
278279
animation.toValue = NSValue(caTransform3D:
279280
CATransform3DConcat(perspective,CATransform3DMakeRotation(CGFloat(CGFloat.pi), 1, 0, 0)))
280281
animation.duration = CFTimeInterval(duration)
282+
animation.repeatCount = repeatCount
281283
animation.beginTime = CACurrentMediaTime() + CFTimeInterval(delay)
282284
animation.timingFunction = getTimingFunction(curve: curve)
283285
layer.add(animation, forKey: "3d")

0 commit comments

Comments
 (0)